xref: /unit/src/nxt_unit_request.h (revision 1733:dab8544b5440)
1 
2 /*
3  * Copyright (C) NGINX, Inc.
4  */
5 
6 #ifndef _NXT_UNIT_REQUEST_H_INCLUDED_
7 #define _NXT_UNIT_REQUEST_H_INCLUDED_
8 
9 
10 #include <inttypes.h>
11 
12 #include "nxt_unit_sptr.h"
13 #include "nxt_unit_field.h"
14 
15 #define NXT_UNIT_NONE_FIELD  0xFFFFFFFFU
16 
17 struct nxt_unit_request_s {
18     uint8_t               method_length;
19     uint8_t               version_length;
20     uint8_t               remote_length;
21     uint8_t               local_length;
22     uint8_t               tls;
23     uint8_t               websocket_handshake;
24     uint8_t               app_target;
25     uint32_t              server_name_length;
26     uint32_t              target_length;
27     uint32_t              path_length;
28     uint32_t              query_length;
29     uint32_t              fields_count;
30 
31     uint32_t              content_length_field;
32     uint32_t              content_type_field;
33     uint32_t              cookie_field;
34     uint32_t              authorization_field;
35 
36     uint64_t              content_length;
37 
38     nxt_unit_sptr_t       method;
39     nxt_unit_sptr_t       version;
40     nxt_unit_sptr_t       remote;
41     nxt_unit_sptr_t       local;
42     nxt_unit_sptr_t       server_name;
43     nxt_unit_sptr_t       target;
44     nxt_unit_sptr_t       path;
45     nxt_unit_sptr_t       query;
46     nxt_unit_sptr_t       preread_content;
47 
48     nxt_unit_field_t      fields[];
49 };
50 
51 
52 #endif /* _NXT_UNIT_REQUEST_H_INCLUDED_ */
53 
54