Igor Sysoev | d90282d | 2004-09-28 08:34:51 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
Igor Sysoev | ff8da91 | 2004-09-29 16:00:49 +0000 | [diff] [blame] | 3 | * Copyright (C) Igor Sysoev |
Igor Sysoev | d90282d | 2004-09-28 08:34:51 +0000 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 7 | #ifndef _NGX_HTTP_REQUEST_H_INCLUDED_ |
| 8 | #define _NGX_HTTP_REQUEST_H_INCLUDED_ |
| 9 | |
| 10 | |
Igor Sysoev | 6f134cc | 2006-05-23 14:54:58 +0000 | [diff] [blame] | 11 | #define NGX_HTTP_MAX_URI_CHANGES 10 |
Igor Sysoev | ef809b8 | 2006-06-28 16:00:26 +0000 | [diff] [blame] | 12 | #define NGX_HTTP_MAX_SUBREQUESTS 50 |
Igor Sysoev | 1d05de4 | 2009-03-06 12:15:07 +0000 | [diff] [blame] | 13 | #define NGX_HTTP_MAX_CAPTURES 9 |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 14 | |
Igor Sysoev | 3338cfd | 2006-05-11 14:43:47 +0000 | [diff] [blame] | 15 | /* must be 2^n */ |
| 16 | #define NGX_HTTP_LC_HEADER_LEN 32 |
| 17 | |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 18 | |
Igor Sysoev | f7abd72 | 2004-09-23 06:32:00 +0000 | [diff] [blame] | 19 | #define NGX_HTTP_DISCARD_BUFFER_SIZE 4096 |
| 20 | #define NGX_HTTP_LINGERING_BUFFER_SIZE 4096 |
| 21 | |
| 22 | |
Igor Sysoev | 10a543a | 2004-03-16 07:10:12 +0000 | [diff] [blame] | 23 | #define NGX_HTTP_VERSION_9 9 |
| 24 | #define NGX_HTTP_VERSION_10 1000 |
| 25 | #define NGX_HTTP_VERSION_11 1001 |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 26 | |
Igor Sysoev | 8a2b2fb | 2006-04-14 09:53:38 +0000 | [diff] [blame] | 27 | #define NGX_HTTP_UNKNOWN 0x0001 |
| 28 | #define NGX_HTTP_GET 0x0002 |
| 29 | #define NGX_HTTP_HEAD 0x0004 |
| 30 | #define NGX_HTTP_POST 0x0008 |
| 31 | #define NGX_HTTP_PUT 0x0010 |
| 32 | #define NGX_HTTP_DELETE 0x0020 |
Igor Sysoev | 7bdb720 | 2006-04-19 15:30:56 +0000 | [diff] [blame] | 33 | #define NGX_HTTP_MKCOL 0x0040 |
Igor Sysoev | 8365f73 | 2006-11-14 12:43:48 +0000 | [diff] [blame] | 34 | #define NGX_HTTP_COPY 0x0080 |
| 35 | #define NGX_HTTP_MOVE 0x0100 |
| 36 | #define NGX_HTTP_OPTIONS 0x0200 |
| 37 | #define NGX_HTTP_PROPFIND 0x0400 |
| 38 | #define NGX_HTTP_PROPPATCH 0x0800 |
| 39 | #define NGX_HTTP_LOCK 0x1000 |
| 40 | #define NGX_HTTP_UNLOCK 0x2000 |
Igor Sysoev | 3e933d2 | 2007-03-30 18:59:26 +0000 | [diff] [blame] | 41 | #define NGX_HTTP_TRACE 0x4000 |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 42 | |
Igor Sysoev | 10a543a | 2004-03-16 07:10:12 +0000 | [diff] [blame] | 43 | #define NGX_HTTP_CONNECTION_CLOSE 1 |
| 44 | #define NGX_HTTP_CONNECTION_KEEP_ALIVE 2 |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 45 | |
| 46 | |
Igor Sysoev | 10a543a | 2004-03-16 07:10:12 +0000 | [diff] [blame] | 47 | #define NGX_NONE 1 |
Igor Sysoev | 3ae3248 | 2003-10-08 15:32:54 +0000 | [diff] [blame] | 48 | |
| 49 | |
Igor Sysoev | 10a543a | 2004-03-16 07:10:12 +0000 | [diff] [blame] | 50 | #define NGX_HTTP_PARSE_HEADER_DONE 1 |
Igor Sysoev | 10fc9ef | 2003-10-27 08:53:49 +0000 | [diff] [blame] | 51 | |
Igor Sysoev | 10a543a | 2004-03-16 07:10:12 +0000 | [diff] [blame] | 52 | #define NGX_HTTP_CLIENT_ERROR 10 |
| 53 | #define NGX_HTTP_PARSE_INVALID_METHOD 10 |
| 54 | #define NGX_HTTP_PARSE_INVALID_REQUEST 11 |
Igor Sysoev | c04deca | 2005-03-28 14:43:02 +0000 | [diff] [blame] | 55 | #define NGX_HTTP_PARSE_INVALID_09_METHOD 12 |
Igor Sysoev | 10fc9ef | 2003-10-27 08:53:49 +0000 | [diff] [blame] | 56 | |
Igor Sysoev | c04deca | 2005-03-28 14:43:02 +0000 | [diff] [blame] | 57 | #define NGX_HTTP_PARSE_INVALID_HEADER 13 |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 58 | |
Igor Sysoev | 960100e | 2006-10-13 15:20:10 +0000 | [diff] [blame] | 59 | |
Igor Sysoev | 09c684b | 2005-11-09 17:25:55 +0000 | [diff] [blame] | 60 | #define NGX_HTTP_ZERO_IN_URI 1 |
Igor Sysoev | 960100e | 2006-10-13 15:20:10 +0000 | [diff] [blame] | 61 | #define NGX_HTTP_SUBREQUEST_IN_MEMORY 2 |
Igor Sysoev | 851cd73 | 2008-12-08 14:23:20 +0000 | [diff] [blame] | 62 | #define NGX_HTTP_SUBREQUEST_WAITED 4 |
Igor Sysoev | 09c684b | 2005-11-09 17:25:55 +0000 | [diff] [blame] | 63 | |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 64 | |
Igor Sysoev | 2b0c76c | 2003-10-27 21:01:00 +0000 | [diff] [blame] | 65 | #define NGX_HTTP_OK 200 |
Igor Sysoev | 8a2b2fb | 2006-04-14 09:53:38 +0000 | [diff] [blame] | 66 | #define NGX_HTTP_CREATED 201 |
Igor Sysoev | 3362b8d | 2005-05-14 18:42:03 +0000 | [diff] [blame] | 67 | #define NGX_HTTP_NO_CONTENT 204 |
Igor Sysoev | 2b0c76c | 2003-10-27 21:01:00 +0000 | [diff] [blame] | 68 | #define NGX_HTTP_PARTIAL_CONTENT 206 |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 69 | |
Igor Sysoev | 2b0c76c | 2003-10-27 21:01:00 +0000 | [diff] [blame] | 70 | #define NGX_HTTP_SPECIAL_RESPONSE 300 |
| 71 | #define NGX_HTTP_MOVED_PERMANENTLY 301 |
| 72 | #define NGX_HTTP_MOVED_TEMPORARILY 302 |
| 73 | #define NGX_HTTP_NOT_MODIFIED 304 |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 74 | |
Igor Sysoev | 2b0c76c | 2003-10-27 21:01:00 +0000 | [diff] [blame] | 75 | #define NGX_HTTP_BAD_REQUEST 400 |
Igor Sysoev | 4d656dc | 2005-03-22 16:02:46 +0000 | [diff] [blame] | 76 | #define NGX_HTTP_UNAUTHORIZED 401 |
Igor Sysoev | 2b0c76c | 2003-10-27 21:01:00 +0000 | [diff] [blame] | 77 | #define NGX_HTTP_FORBIDDEN 403 |
| 78 | #define NGX_HTTP_NOT_FOUND 404 |
| 79 | #define NGX_HTTP_NOT_ALLOWED 405 |
| 80 | #define NGX_HTTP_REQUEST_TIME_OUT 408 |
Igor Sysoev | 7bdb720 | 2006-04-19 15:30:56 +0000 | [diff] [blame] | 81 | #define NGX_HTTP_CONFLICT 409 |
Igor Sysoev | c31a9bb | 2005-11-26 10:11:11 +0000 | [diff] [blame] | 82 | #define NGX_HTTP_LENGTH_REQUIRED 411 |
Igor Sysoev | da7281a | 2007-01-18 20:51:51 +0000 | [diff] [blame] | 83 | #define NGX_HTTP_PRECONDITION_FAILED 412 |
Igor Sysoev | 2b0c76c | 2003-10-27 21:01:00 +0000 | [diff] [blame] | 84 | #define NGX_HTTP_REQUEST_ENTITY_TOO_LARGE 413 |
| 85 | #define NGX_HTTP_REQUEST_URI_TOO_LARGE 414 |
Igor Sysoev | 7bdb720 | 2006-04-19 15:30:56 +0000 | [diff] [blame] | 86 | #define NGX_HTTP_UNSUPPORTED_MEDIA_TYPE 415 |
Igor Sysoev | 2b0c76c | 2003-10-27 21:01:00 +0000 | [diff] [blame] | 87 | #define NGX_HTTP_RANGE_NOT_SATISFIABLE 416 |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 88 | |
Igor Sysoev | 3043bfc | 2004-05-14 16:51:47 +0000 | [diff] [blame] | 89 | |
| 90 | /* Our own HTTP codes */ |
| 91 | |
Igor Sysoev | cdc4630 | 2005-12-07 14:51:31 +0000 | [diff] [blame] | 92 | /* The special code to close connection without any response */ |
| 93 | #define NGX_HTTP_CLOSE 444 |
| 94 | |
Igor Sysoev | 44d8722 | 2006-05-06 16:28:56 +0000 | [diff] [blame] | 95 | #define NGX_HTTP_OWN_CODES 495 |
| 96 | |
| 97 | #define NGX_HTTPS_CERT_ERROR 495 |
| 98 | #define NGX_HTTPS_NO_CERT 496 |
Igor Sysoev | e739eb7 | 2004-07-09 07:12:14 +0000 | [diff] [blame] | 99 | |
| 100 | /* |
| 101 | * We use the special code for the plain HTTP requests that are sent to |
Igor Sysoev | 0e5dc5c | 2005-11-15 13:30:52 +0000 | [diff] [blame] | 102 | * HTTPS port to distinguish it from 4XX in an error page redirection |
Igor Sysoev | e739eb7 | 2004-07-09 07:12:14 +0000 | [diff] [blame] | 103 | */ |
| 104 | #define NGX_HTTP_TO_HTTPS 497 |
Igor Sysoev | 3043bfc | 2004-05-14 16:51:47 +0000 | [diff] [blame] | 105 | |
Igor Sysoev | c2807ec | 2006-02-16 15:26:46 +0000 | [diff] [blame] | 106 | /* 498 is the canceled code for the requests with invalid host name */ |
Igor Sysoev | 3043bfc | 2004-05-14 16:51:47 +0000 | [diff] [blame] | 107 | |
Igor Sysoev | 222a2ad | 2003-11-18 16:49:00 +0000 | [diff] [blame] | 108 | /* |
Igor Sysoev | a2aca9a | 2004-01-18 21:09:21 +0000 | [diff] [blame] | 109 | * HTTP does not define the code for the case when a client closed |
| 110 | * the connection while we are processing its request so we introduce |
| 111 | * own code to log such situation when a client has closed the connection |
| 112 | * before we even try to send the HTTP header to it |
Igor Sysoev | 222a2ad | 2003-11-18 16:49:00 +0000 | [diff] [blame] | 113 | */ |
Igor Sysoev | 1b138ed | 2003-11-18 21:34:08 +0000 | [diff] [blame] | 114 | #define NGX_HTTP_CLIENT_CLOSED_REQUEST 499 |
Igor Sysoev | 222a2ad | 2003-11-18 16:49:00 +0000 | [diff] [blame] | 115 | |
Igor Sysoev | 3043bfc | 2004-05-14 16:51:47 +0000 | [diff] [blame] | 116 | |
Igor Sysoev | 2b0c76c | 2003-10-27 21:01:00 +0000 | [diff] [blame] | 117 | #define NGX_HTTP_INTERNAL_SERVER_ERROR 500 |
| 118 | #define NGX_HTTP_NOT_IMPLEMENTED 501 |
| 119 | #define NGX_HTTP_BAD_GATEWAY 502 |
| 120 | #define NGX_HTTP_SERVICE_UNAVAILABLE 503 |
| 121 | #define NGX_HTTP_GATEWAY_TIME_OUT 504 |
Igor Sysoev | 7bdb720 | 2006-04-19 15:30:56 +0000 | [diff] [blame] | 122 | #define NGX_HTTP_INSUFFICIENT_STORAGE 507 |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 123 | |
| 124 | |
Igor Sysoev | 020ffea | 2006-10-30 20:25:22 +0000 | [diff] [blame] | 125 | #define NGX_HTTP_LOWLEVEL_BUFFERED 0xf0 |
| 126 | #define NGX_HTTP_WRITE_BUFFERED 0x10 |
| 127 | #define NGX_HTTP_GZIP_BUFFERED 0x20 |
| 128 | #define NGX_HTTP_SSI_BUFFERED 0x01 |
Igor Sysoev | d9bb8e3 | 2007-04-19 17:54:23 +0000 | [diff] [blame] | 129 | #define NGX_HTTP_SUB_BUFFERED 0x02 |
| 130 | #define NGX_HTTP_COPY_BUFFERED 0x04 |
Igor Sysoev | df3254a | 2006-01-11 15:26:57 +0000 | [diff] [blame] | 131 | |
| 132 | |
Igor Sysoev | 3b30a90 | 2003-12-25 20:26:58 +0000 | [diff] [blame] | 133 | typedef enum { |
| 134 | NGX_HTTP_INITING_REQUEST_STATE = 0, |
| 135 | NGX_HTTP_READING_REQUEST_STATE, |
| 136 | NGX_HTTP_PROCESS_REQUEST_STATE, |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 137 | |
Igor Sysoev | 3b30a90 | 2003-12-25 20:26:58 +0000 | [diff] [blame] | 138 | NGX_HTTP_CONNECT_UPSTREAM_STATE, |
| 139 | NGX_HTTP_WRITING_UPSTREAM_STATE, |
| 140 | NGX_HTTP_READING_UPSTREAM_STATE, |
| 141 | |
| 142 | NGX_HTTP_WRITING_REQUEST_STATE, |
| 143 | NGX_HTTP_LINGERING_CLOSE_STATE, |
| 144 | NGX_HTTP_KEEPALIVE_STATE |
| 145 | } ngx_http_state_e; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 146 | |
| 147 | |
| 148 | typedef struct { |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 149 | ngx_str_t name; |
| 150 | ngx_uint_t offset; |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 151 | ngx_http_header_handler_pt handler; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 152 | } ngx_http_header_t; |
| 153 | |
| 154 | |
| 155 | typedef struct { |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 156 | ngx_str_t name; |
| 157 | ngx_uint_t offset; |
Igor Sysoev | 9ac946b | 2005-10-24 15:09:41 +0000 | [diff] [blame] | 158 | } ngx_http_header_out_t; |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 159 | |
| 160 | |
| 161 | typedef struct { |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 162 | ngx_list_t headers; |
Igor Sysoev | b5faed2 | 2003-10-29 08:30:44 +0000 | [diff] [blame] | 163 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 164 | ngx_table_elt_t *host; |
| 165 | ngx_table_elt_t *connection; |
| 166 | ngx_table_elt_t *if_modified_since; |
| 167 | ngx_table_elt_t *user_agent; |
| 168 | ngx_table_elt_t *referer; |
| 169 | ngx_table_elt_t *content_length; |
| 170 | ngx_table_elt_t *content_type; |
Igor Sysoev | 67f88e9 | 2004-03-12 16:57:08 +0000 | [diff] [blame] | 171 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 172 | ngx_table_elt_t *range; |
Igor Sysoev | 6c2f052 | 2007-11-09 15:41:35 +0000 | [diff] [blame] | 173 | ngx_table_elt_t *if_range; |
Igor Sysoev | 7578ec9 | 2003-06-02 15:24:30 +0000 | [diff] [blame] | 174 | |
Igor Sysoev | c31a9bb | 2005-11-26 10:11:11 +0000 | [diff] [blame] | 175 | ngx_table_elt_t *transfer_encoding; |
Igor Sysoev | 1e1f4c8 | 2008-06-26 13:00:39 +0000 | [diff] [blame] | 176 | ngx_table_elt_t *expect; |
Igor Sysoev | c31a9bb | 2005-11-26 10:11:11 +0000 | [diff] [blame] | 177 | |
Igor Sysoev | 67f88e9 | 2004-03-12 16:57:08 +0000 | [diff] [blame] | 178 | #if (NGX_HTTP_GZIP) |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 179 | ngx_table_elt_t *accept_encoding; |
| 180 | ngx_table_elt_t *via; |
Igor Sysoev | 67f88e9 | 2004-03-12 16:57:08 +0000 | [diff] [blame] | 181 | #endif |
| 182 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 183 | ngx_table_elt_t *authorization; |
Igor Sysoev | cf80a70 | 2003-11-03 22:20:44 +0000 | [diff] [blame] | 184 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 185 | ngx_table_elt_t *keep_alive; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 186 | |
Igor Sysoev | 09c684b | 2005-11-09 17:25:55 +0000 | [diff] [blame] | 187 | #if (NGX_HTTP_PROXY || NGX_HTTP_REALIP) |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 188 | ngx_table_elt_t *x_forwarded_for; |
Igor Sysoev | 67f88e9 | 2004-03-12 16:57:08 +0000 | [diff] [blame] | 189 | #endif |
| 190 | |
Igor Sysoev | 09c684b | 2005-11-09 17:25:55 +0000 | [diff] [blame] | 191 | #if (NGX_HTTP_REALIP) |
| 192 | ngx_table_elt_t *x_real_ip; |
| 193 | #endif |
| 194 | |
Igor Sysoev | 1ebfead | 2005-02-16 13:40:36 +0000 | [diff] [blame] | 195 | #if (NGX_HTTP_HEADERS) |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 196 | ngx_table_elt_t *accept; |
| 197 | ngx_table_elt_t *accept_language; |
Igor Sysoev | 1ebfead | 2005-02-16 13:40:36 +0000 | [diff] [blame] | 198 | #endif |
| 199 | |
Igor Sysoev | 7bdb720 | 2006-04-19 15:30:56 +0000 | [diff] [blame] | 200 | #if (NGX_HTTP_DAV) |
| 201 | ngx_table_elt_t *depth; |
| 202 | ngx_table_elt_t *destination; |
Igor Sysoev | 56331ba | 2007-01-18 21:11:23 +0000 | [diff] [blame] | 203 | ngx_table_elt_t *overwrite; |
Igor Sysoev | da173ab | 2006-08-30 10:39:17 +0000 | [diff] [blame] | 204 | ngx_table_elt_t *date; |
Igor Sysoev | 7bdb720 | 2006-04-19 15:30:56 +0000 | [diff] [blame] | 205 | #endif |
| 206 | |
Igor Sysoev | 4d656dc | 2005-03-22 16:02:46 +0000 | [diff] [blame] | 207 | ngx_str_t user; |
| 208 | ngx_str_t passwd; |
| 209 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 210 | ngx_array_t cookies; |
Igor Sysoev | 967fd63 | 2004-08-27 15:40:59 +0000 | [diff] [blame] | 211 | |
Igor Sysoev | 5fd0931 | 2008-05-15 14:44:47 +0000 | [diff] [blame] | 212 | ngx_str_t server; |
Igor Sysoev | 1765f47 | 2006-07-07 16:33:19 +0000 | [diff] [blame] | 213 | off_t content_length_n; |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 214 | time_t keep_alive_n; |
Igor Sysoev | 2f65722 | 2004-06-16 15:32:11 +0000 | [diff] [blame] | 215 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 216 | unsigned connection_type:2; |
| 217 | unsigned msie:1; |
| 218 | unsigned msie4:1; |
Igor Sysoev | 54477e4 | 2008-08-26 15:09:28 +0000 | [diff] [blame] | 219 | unsigned msie6:1; |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 220 | unsigned opera:1; |
| 221 | unsigned gecko:1; |
| 222 | unsigned konqueror:1; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 223 | } ngx_http_headers_in_t; |
| 224 | |
| 225 | |
| 226 | typedef struct { |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 227 | ngx_list_t headers; |
Igor Sysoev | b5faed2 | 2003-10-29 08:30:44 +0000 | [diff] [blame] | 228 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 229 | ngx_uint_t status; |
| 230 | ngx_str_t status_line; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 231 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 232 | ngx_table_elt_t *server; |
| 233 | ngx_table_elt_t *date; |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 234 | ngx_table_elt_t *content_length; |
| 235 | ngx_table_elt_t *content_encoding; |
| 236 | ngx_table_elt_t *location; |
Igor Sysoev | 32717eb | 2007-11-27 11:56:18 +0000 | [diff] [blame] | 237 | ngx_table_elt_t *refresh; |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 238 | ngx_table_elt_t *last_modified; |
| 239 | ngx_table_elt_t *content_range; |
| 240 | ngx_table_elt_t *accept_ranges; |
Igor Sysoev | 4d656dc | 2005-03-22 16:02:46 +0000 | [diff] [blame] | 241 | ngx_table_elt_t *www_authenticate; |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 242 | ngx_table_elt_t *expires; |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 243 | ngx_table_elt_t *etag; |
Igor Sysoev | 7578ec9 | 2003-06-02 15:24:30 +0000 | [diff] [blame] | 244 | |
Igor Sysoev | ef809b8 | 2006-06-28 16:00:26 +0000 | [diff] [blame] | 245 | ngx_str_t *override_charset; |
| 246 | |
| 247 | size_t content_type_len; |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 248 | ngx_str_t content_type; |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 249 | ngx_str_t charset; |
Igor Sysoev | b5bc3f9 | 2008-08-04 11:29:09 +0000 | [diff] [blame] | 250 | u_char *content_type_lowcase; |
| 251 | ngx_uint_t content_type_hash; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 252 | |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 253 | ngx_array_t cache_control; |
| 254 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 255 | off_t content_length_n; |
| 256 | time_t date_time; |
| 257 | time_t last_modified_time; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 258 | } ngx_http_headers_out_t; |
| 259 | |
| 260 | |
Igor Sysoev | 02025fd | 2005-01-18 13:03:58 +0000 | [diff] [blame] | 261 | typedef void (*ngx_http_client_body_handler_pt)(ngx_http_request_t *r); |
| 262 | |
Igor Sysoev | 11dbe97 | 2004-03-29 17:43:58 +0000 | [diff] [blame] | 263 | typedef struct { |
Igor Sysoev | 02025fd | 2005-01-18 13:03:58 +0000 | [diff] [blame] | 264 | ngx_temp_file_t *temp_file; |
| 265 | ngx_chain_t *bufs; |
| 266 | ngx_buf_t *buf; |
Igor Sysoev | 1765f47 | 2006-07-07 16:33:19 +0000 | [diff] [blame] | 267 | off_t rest; |
Igor Sysoev | 8a2b2fb | 2006-04-14 09:53:38 +0000 | [diff] [blame] | 268 | ngx_chain_t *to_write; |
Igor Sysoev | 02025fd | 2005-01-18 13:03:58 +0000 | [diff] [blame] | 269 | ngx_http_client_body_handler_pt post_handler; |
Igor Sysoev | 11dbe97 | 2004-03-29 17:43:58 +0000 | [diff] [blame] | 270 | } ngx_http_request_body_t; |
| 271 | |
| 272 | |
Igor Sysoev | dd888c4 | 2004-09-21 05:38:28 +0000 | [diff] [blame] | 273 | typedef struct { |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 274 | ngx_http_request_t *request; |
Igor Sysoev | 4624ae7 | 2004-09-21 15:47:05 +0000 | [diff] [blame] | 275 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 276 | ngx_buf_t **busy; |
| 277 | ngx_int_t nbusy; |
Igor Sysoev | 4624ae7 | 2004-09-21 15:47:05 +0000 | [diff] [blame] | 278 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 279 | ngx_buf_t **free; |
| 280 | ngx_int_t nfree; |
Igor Sysoev | 4624ae7 | 2004-09-21 15:47:05 +0000 | [diff] [blame] | 281 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 282 | ngx_uint_t pipeline; /* unsigned pipeline:1; */ |
Igor Sysoev | dd888c4 | 2004-09-21 05:38:28 +0000 | [diff] [blame] | 283 | } ngx_http_connection_t; |
| 284 | |
| 285 | |
Igor Sysoev | 43c3bf4 | 2007-08-12 19:48:12 +0000 | [diff] [blame] | 286 | typedef struct ngx_http_server_name_s ngx_http_server_name_t; |
| 287 | |
| 288 | |
| 289 | typedef struct { |
| 290 | ngx_hash_combined_t names; |
| 291 | |
| 292 | ngx_uint_t nregex; |
| 293 | ngx_http_server_name_t *regex; |
| 294 | } ngx_http_virtual_names_t; |
Igor Sysoev | 305a9d8 | 2005-12-26 17:07:48 +0000 | [diff] [blame] | 295 | |
| 296 | |
Igor Sysoev | 9ac946b | 2005-10-24 15:09:41 +0000 | [diff] [blame] | 297 | typedef void (*ngx_http_cleanup_pt)(void *data); |
| 298 | |
| 299 | typedef struct ngx_http_cleanup_s ngx_http_cleanup_t; |
| 300 | |
| 301 | struct ngx_http_cleanup_s { |
Igor Sysoev | 305a9d8 | 2005-12-26 17:07:48 +0000 | [diff] [blame] | 302 | ngx_http_cleanup_pt handler; |
| 303 | void *data; |
| 304 | ngx_http_cleanup_t *next; |
Igor Sysoev | 9ac946b | 2005-10-24 15:09:41 +0000 | [diff] [blame] | 305 | }; |
| 306 | |
| 307 | |
Igor Sysoev | 960100e | 2006-10-13 15:20:10 +0000 | [diff] [blame] | 308 | typedef ngx_int_t (*ngx_http_post_subrequest_pt)(ngx_http_request_t *r, |
| 309 | void *data, ngx_int_t rc); |
| 310 | |
| 311 | typedef struct { |
| 312 | ngx_http_post_subrequest_pt handler; |
| 313 | void *data; |
| 314 | } ngx_http_post_subrequest_t; |
| 315 | |
| 316 | |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 317 | typedef struct ngx_http_postponed_request_s ngx_http_postponed_request_t; |
| 318 | |
| 319 | struct ngx_http_postponed_request_s { |
Igor Sysoev | b85fd59 | 2005-08-23 15:36:54 +0000 | [diff] [blame] | 320 | ngx_http_request_t *request; |
| 321 | ngx_chain_t *out; |
| 322 | ngx_http_postponed_request_t *next; |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 323 | }; |
| 324 | |
| 325 | |
Igor Sysoev | 851cd73 | 2008-12-08 14:23:20 +0000 | [diff] [blame] | 326 | typedef struct ngx_http_posted_request_s ngx_http_posted_request_t; |
| 327 | |
| 328 | struct ngx_http_posted_request_s { |
| 329 | ngx_http_request_t *request; |
| 330 | ngx_http_posted_request_t *next; |
| 331 | }; |
| 332 | |
| 333 | |
Igor Sysoev | 2f65722 | 2004-06-16 15:32:11 +0000 | [diff] [blame] | 334 | typedef ngx_int_t (*ngx_http_handler_pt)(ngx_http_request_t *r); |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 335 | typedef void (*ngx_http_event_handler_pt)(ngx_http_request_t *r); |
| 336 | |
Igor Sysoev | b3e73d8 | 2003-10-10 15:10:50 +0000 | [diff] [blame] | 337 | |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 338 | struct ngx_http_request_s { |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 339 | uint32_t signature; /* "HTTP" */ |
Igor Sysoev | c83f683 | 2004-06-24 07:53:37 +0000 | [diff] [blame] | 340 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 341 | ngx_connection_t *connection; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 342 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 343 | void **ctx; |
| 344 | void **main_conf; |
| 345 | void **srv_conf; |
| 346 | void **loc_conf; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 347 | |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 348 | ngx_http_event_handler_pt read_event_handler; |
| 349 | ngx_http_event_handler_pt write_event_handler; |
| 350 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 351 | ngx_http_cache_t *cache; |
Igor Sysoev | 0e499db | 2003-11-27 07:45:22 +0000 | [diff] [blame] | 352 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 353 | ngx_http_upstream_t *upstream; |
Igor Sysoev | e0f8662 | 2007-04-18 20:23:19 +0000 | [diff] [blame] | 354 | ngx_array_t *upstream_states; |
| 355 | /* of ngx_http_upstream_state_t */ |
Igor Sysoev | 02025fd | 2005-01-18 13:03:58 +0000 | [diff] [blame] | 356 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 357 | ngx_pool_t *pool; |
| 358 | ngx_buf_t *header_in; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 359 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 360 | ngx_http_headers_in_t headers_in; |
| 361 | ngx_http_headers_out_t headers_out; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 362 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 363 | ngx_http_request_body_t *request_body; |
Igor Sysoev | 11dbe97 | 2004-03-29 17:43:58 +0000 | [diff] [blame] | 364 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 365 | time_t lingering_time; |
Igor Sysoev | b4ccb9f | 2007-04-21 07:50:19 +0000 | [diff] [blame] | 366 | time_t start_sec; |
| 367 | ngx_msec_t start_msec; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 368 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 369 | ngx_uint_t method; |
| 370 | ngx_uint_t http_version; |
Igor Sysoev | 0e5dc5c | 2005-11-15 13:30:52 +0000 | [diff] [blame] | 371 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 372 | ngx_str_t request_line; |
| 373 | ngx_str_t uri; |
| 374 | ngx_str_t args; |
| 375 | ngx_str_t exten; |
| 376 | ngx_str_t unparsed_uri; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 377 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 378 | ngx_str_t method_name; |
| 379 | ngx_str_t http_protocol; |
Igor Sysoev | 0e5dc5c | 2005-11-15 13:30:52 +0000 | [diff] [blame] | 380 | |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 381 | ngx_chain_t *out; |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 382 | ngx_http_request_t *main; |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 383 | ngx_http_request_t *parent; |
| 384 | ngx_http_postponed_request_t *postponed; |
Igor Sysoev | 960100e | 2006-10-13 15:20:10 +0000 | [diff] [blame] | 385 | ngx_http_post_subrequest_t *post_subrequest; |
Igor Sysoev | 851cd73 | 2008-12-08 14:23:20 +0000 | [diff] [blame] | 386 | ngx_http_posted_request_t *posted_requests; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 387 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 388 | ngx_int_t phase_handler; |
| 389 | ngx_http_handler_pt content_handler; |
Igor Sysoev | 31eb8c0 | 2005-09-23 11:02:22 +0000 | [diff] [blame] | 390 | ngx_uint_t access_code; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 391 | |
Igor Sysoev | 09c684b | 2005-11-09 17:25:55 +0000 | [diff] [blame] | 392 | ngx_http_variable_value_t *variables; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 393 | |
Igor Sysoev | 1d05de4 | 2009-03-06 12:15:07 +0000 | [diff] [blame] | 394 | #if (NGX_PCRE) |
| 395 | ngx_uint_t ncaptures; |
| 396 | int *captures; |
| 397 | u_char *captures_data; |
| 398 | #endif |
| 399 | |
Igor Sysoev | 5192b36 | 2005-07-08 14:34:20 +0000 | [diff] [blame] | 400 | size_t limit_rate; |
| 401 | |
Igor Sysoev | 11dbe97 | 2004-03-29 17:43:58 +0000 | [diff] [blame] | 402 | /* used to learn the Apache compatible response length without a header */ |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 403 | size_t header_size; |
Igor Sysoev | dc867cd | 2003-12-14 20:10:27 +0000 | [diff] [blame] | 404 | |
Igor Sysoev | 1765f47 | 2006-07-07 16:33:19 +0000 | [diff] [blame] | 405 | off_t request_length; |
Igor Sysoev | 6a12fc9 | 2004-12-06 14:45:08 +0000 | [diff] [blame] | 406 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 407 | ngx_uint_t err_status; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 408 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 409 | ngx_http_connection_t *http_connection; |
Igor Sysoev | dd888c4 | 2004-09-21 05:38:28 +0000 | [diff] [blame] | 410 | |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 411 | ngx_http_log_handler_pt log_handler; |
| 412 | |
Igor Sysoev | 9ac946b | 2005-10-24 15:09:41 +0000 | [diff] [blame] | 413 | ngx_http_cleanup_t *cleanup; |
| 414 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 415 | unsigned http_state:4; |
Igor Sysoev | 3b30a90 | 2003-12-25 20:26:58 +0000 | [diff] [blame] | 416 | |
Igor Sysoev | 924bd79 | 2004-10-11 15:07:03 +0000 | [diff] [blame] | 417 | /* URI with "/." and on Win32 with "//" */ |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 418 | unsigned complex_uri:1; |
Igor Sysoev | 805d9db | 2005-02-03 19:33:37 +0000 | [diff] [blame] | 419 | |
Igor Sysoev | 924bd79 | 2004-10-11 15:07:03 +0000 | [diff] [blame] | 420 | /* URI with "%" */ |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 421 | unsigned quoted_uri:1; |
Igor Sysoev | 805d9db | 2005-02-03 19:33:37 +0000 | [diff] [blame] | 422 | |
| 423 | /* URI with "+" */ |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 424 | unsigned plus_in_uri:1; |
Igor Sysoev | 805d9db | 2005-02-03 19:33:37 +0000 | [diff] [blame] | 425 | |
Igor Sysoev | 1ebfead | 2005-02-16 13:40:36 +0000 | [diff] [blame] | 426 | /* URI with "\0" or "%00" */ |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 427 | unsigned zero_in_uri:1; |
Igor Sysoev | 1ebfead | 2005-02-16 13:40:36 +0000 | [diff] [blame] | 428 | |
Igor Sysoev | 3362b8d | 2005-05-14 18:42:03 +0000 | [diff] [blame] | 429 | unsigned invalid_header:1; |
| 430 | |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 431 | unsigned valid_location:1; |
Igor Sysoev | c04deca | 2005-03-28 14:43:02 +0000 | [diff] [blame] | 432 | unsigned valid_unparsed_uri:1; |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 433 | unsigned uri_changed:1; |
| 434 | unsigned uri_changes:4; |
Igor Sysoev | 805d9db | 2005-02-03 19:33:37 +0000 | [diff] [blame] | 435 | |
Igor Sysoev | 8a2b2fb | 2006-04-14 09:53:38 +0000 | [diff] [blame] | 436 | unsigned request_body_in_single_buf:1; |
| 437 | unsigned request_body_in_file_only:1; |
| 438 | unsigned request_body_in_persistent_file:1; |
Igor Sysoev | cd5b99a | 2007-01-25 08:45:04 +0000 | [diff] [blame] | 439 | unsigned request_body_in_clean_file:1; |
Igor Sysoev | 8a2b2fb | 2006-04-14 09:53:38 +0000 | [diff] [blame] | 440 | unsigned request_body_file_group_access:1; |
Igor Sysoev | 7bdb720 | 2006-04-19 15:30:56 +0000 | [diff] [blame] | 441 | unsigned request_body_file_log_level:3; |
Igor Sysoev | 8a2b2fb | 2006-04-14 09:53:38 +0000 | [diff] [blame] | 442 | |
Igor Sysoev | 960100e | 2006-10-13 15:20:10 +0000 | [diff] [blame] | 443 | unsigned subrequest_in_memory:1; |
Igor Sysoev | 851cd73 | 2008-12-08 14:23:20 +0000 | [diff] [blame] | 444 | unsigned waited:1; |
Igor Sysoev | df3254a | 2006-01-11 15:26:57 +0000 | [diff] [blame] | 445 | |
Igor Sysoev | c16b005 | 2007-12-27 14:21:59 +0000 | [diff] [blame] | 446 | unsigned gzip:2; |
| 447 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 448 | unsigned proxy:1; |
| 449 | unsigned bypass_cache:1; |
| 450 | unsigned no_cache:1; |
Igor Sysoev | 6597749 | 2003-11-02 22:56:18 +0000 | [diff] [blame] | 451 | |
Igor Sysoev | 6eee801 | 2007-01-07 17:47:17 +0000 | [diff] [blame] | 452 | /* |
Igor Sysoev | abe378e | 2008-11-10 15:22:33 +0000 | [diff] [blame] | 453 | * instead of using the request context data in |
Igor Sysoev | ead8091 | 2008-11-11 16:04:05 +0000 | [diff] [blame] | 454 | * ngx_http_limit_zone_module and ngx_http_limit_req_module |
Igor Sysoev | abe378e | 2008-11-10 15:22:33 +0000 | [diff] [blame] | 455 | * we use the single bits in the request structure |
Igor Sysoev | 6eee801 | 2007-01-07 17:47:17 +0000 | [diff] [blame] | 456 | */ |
| 457 | unsigned limit_zone_set:1; |
Igor Sysoev | abe378e | 2008-11-10 15:22:33 +0000 | [diff] [blame] | 458 | unsigned limit_req_set:1; |
Igor Sysoev | 6eee801 | 2007-01-07 17:47:17 +0000 | [diff] [blame] | 459 | |
Igor Sysoev | 7578ec9 | 2003-06-02 15:24:30 +0000 | [diff] [blame] | 460 | #if 0 |
Igor Sysoev | 2d3f3f6 | 2007-10-14 18:56:15 +0000 | [diff] [blame] | 461 | unsigned cacheable:1; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 462 | #endif |
| 463 | |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 464 | unsigned pipeline:1; |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 465 | unsigned plain_http:1; |
| 466 | unsigned chunked:1; |
| 467 | unsigned header_only:1; |
Igor Sysoev | 8fd830a | 2006-10-02 10:22:51 +0000 | [diff] [blame] | 468 | unsigned zero_body:1; |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 469 | unsigned keepalive:1; |
| 470 | unsigned lingering_close:1; |
Igor Sysoev | e503539 | 2005-08-30 10:55:07 +0000 | [diff] [blame] | 471 | unsigned discard_body:1; |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 472 | unsigned internal:1; |
Igor Sysoev | 3f8dc59 | 2006-08-28 16:57:48 +0000 | [diff] [blame] | 473 | unsigned error_page:1; |
Igor Sysoev | 6d16e1e | 2006-04-05 13:40:54 +0000 | [diff] [blame] | 474 | unsigned post_action:1; |
| 475 | unsigned request_complete:1; |
Igor Sysoev | 8f12558 | 2006-07-28 15:16:17 +0000 | [diff] [blame] | 476 | unsigned request_output:1; |
| 477 | unsigned header_sent:1; |
Igor Sysoev | 1e1f4c8 | 2008-06-26 13:00:39 +0000 | [diff] [blame] | 478 | unsigned expect_tested:1; |
Igor Sysoev | edf1c8c | 2008-07-07 09:26:13 +0000 | [diff] [blame] | 479 | unsigned root_tested:1; |
Igor Sysoev | 899b44e | 2005-05-12 14:58:06 +0000 | [diff] [blame] | 480 | unsigned done:1; |
Igor Sysoev | eb62fa0 | 2008-09-29 13:18:41 +0000 | [diff] [blame] | 481 | unsigned logged:1; |
Igor Sysoev | b145b06 | 2005-06-15 18:33:41 +0000 | [diff] [blame] | 482 | unsigned utf8:1; |
Igor Sysoev | 7578ec9 | 2003-06-02 15:24:30 +0000 | [diff] [blame] | 483 | |
Igor Sysoev | 020ffea | 2006-10-30 20:25:22 +0000 | [diff] [blame] | 484 | unsigned buffered:4; |
| 485 | |
Igor Sysoev | d52477f | 2005-05-16 13:53:20 +0000 | [diff] [blame] | 486 | unsigned main_filter_need_in_memory:1; |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 487 | unsigned filter_need_in_memory:1; |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 488 | unsigned filter_need_temporary:1; |
Igor Sysoev | c31a9bb | 2005-11-26 10:11:11 +0000 | [diff] [blame] | 489 | unsigned allow_ranges:1; |
Igor Sysoev | 7578ec9 | 2003-06-02 15:24:30 +0000 | [diff] [blame] | 490 | |
Igor Sysoev | 85cccfb | 2004-09-15 16:00:43 +0000 | [diff] [blame] | 491 | #if (NGX_STAT_STUB) |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 492 | unsigned stat_reading:1; |
| 493 | unsigned stat_writing:1; |
Igor Sysoev | 85cccfb | 2004-09-15 16:00:43 +0000 | [diff] [blame] | 494 | #endif |
| 495 | |
Igor Sysoev | ef809b8 | 2006-06-28 16:00:26 +0000 | [diff] [blame] | 496 | unsigned subrequests:8; |
| 497 | |
Igor Sysoev | 7578ec9 | 2003-06-02 15:24:30 +0000 | [diff] [blame] | 498 | /* used to parse HTTP headers */ |
Igor Sysoev | c3df798 | 2006-10-12 13:08:26 +0000 | [diff] [blame] | 499 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 500 | ngx_uint_t state; |
| 501 | u_char *uri_start; |
| 502 | u_char *uri_end; |
| 503 | u_char *uri_ext; |
| 504 | u_char *args_start; |
| 505 | u_char *request_start; |
| 506 | u_char *request_end; |
| 507 | u_char *method_end; |
| 508 | u_char *schema_start; |
| 509 | u_char *schema_end; |
| 510 | u_char *host_start; |
| 511 | u_char *host_end; |
| 512 | u_char *port_start; |
| 513 | u_char *port_end; |
| 514 | u_char *header_name_start; |
| 515 | u_char *header_name_end; |
| 516 | u_char *header_start; |
| 517 | u_char *header_end; |
Igor Sysoev | 3338cfd | 2006-05-11 14:43:47 +0000 | [diff] [blame] | 518 | |
Igor Sysoev | c3df798 | 2006-10-12 13:08:26 +0000 | [diff] [blame] | 519 | unsigned http_minor:16; |
| 520 | unsigned http_major:16; |
| 521 | |
Igor Sysoev | 02f742b | 2005-04-08 15:18:55 +0000 | [diff] [blame] | 522 | ngx_uint_t header_hash; |
Igor Sysoev | 3338cfd | 2006-05-11 14:43:47 +0000 | [diff] [blame] | 523 | ngx_uint_t lowcase_index; |
| 524 | u_char lowcase_header[NGX_HTTP_LC_HEADER_LEN]; |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 525 | }; |
| 526 | |
| 527 | |
Igor Sysoev | 9ac946b | 2005-10-24 15:09:41 +0000 | [diff] [blame] | 528 | extern ngx_http_header_t ngx_http_headers_in[]; |
| 529 | extern ngx_http_header_out_t ngx_http_headers_out[]; |
Igor Sysoev | b5faed2 | 2003-10-29 08:30:44 +0000 | [diff] [blame] | 530 | |
| 531 | |
Igor Sysoev | a983011 | 2003-05-19 16:39:14 +0000 | [diff] [blame] | 532 | #endif /* _NGX_HTTP_REQUEST_H_INCLUDED_ */ |