comparison src/http/ngx_http_request.h @ 297:ee394e997c77

nginx-0.0.3-2004-03-29-21:43:58 import
author Igor Sysoev <igor@sysoev.ru>
date Mon, 29 Mar 2004 17:43:58 +0000
parents bfe099e3f5b4
children 4a3f18406832
comparison
equal deleted inserted replaced
296:bfe099e3f5b4 297:ee394e997c77
115 ssize_t keep_alive_n; 115 ssize_t keep_alive_n;
116 } ngx_http_headers_in_t; 116 } ngx_http_headers_in_t;
117 117
118 118
119 typedef struct { 119 typedef struct {
120 ngx_chain_t chain[4];
121 ngx_hunk_t *header_out;
122 ngx_hunk_t *hunk;
123 ngx_hunk_t *file_hunk;
124 ngx_file_t temp_file;
125 ngx_path_t *temp_path;
126 off_t offset;
127 u_char *header_in_pos;
128 } ngx_http_request_body_t;
129
130
131 typedef struct {
132 off_t start; 120 off_t start;
133 off_t end; 121 off_t end;
134 ngx_str_t content_range; 122 ngx_str_t content_range;
135 } ngx_http_range_t; 123 } ngx_http_range_t;
136 124
137 125
138 typedef struct { 126 typedef struct {
139 ngx_table_t headers; /* it must be first field */ 127 ngx_table_t headers; /* it must be first field */
140 128
141 int status; 129 ngx_uint_t status;
142 ngx_str_t status_line; 130 ngx_str_t status_line;
143 131
144 ngx_table_elt_t *server; 132 ngx_table_elt_t *server;
145 ngx_table_elt_t *date; 133 ngx_table_elt_t *date;
146 ngx_table_elt_t *content_type; 134 ngx_table_elt_t *content_type;
159 time_t date_time; 147 time_t date_time;
160 time_t last_modified_time; 148 time_t last_modified_time;
161 } ngx_http_headers_out_t; 149 } ngx_http_headers_out_t;
162 150
163 151
152 typedef struct {
153 ngx_temp_file_t *temp_file;
154 ngx_chain_t *bufs;
155 ngx_hunk_t *buf;
156 size_t rest;
157 size_t buf_size;
158 void (*handler) (void *data);
159 void *data;
160 } ngx_http_request_body_t;
161
162
164 struct ngx_http_cleanup_s { 163 struct ngx_http_cleanup_s {
165 union { 164 union {
166 struct { 165 struct {
167 ngx_fd_t fd; 166 ngx_fd_t fd;
168 u_char *name; 167 u_char *name;
189 void **srv_conf; 188 void **srv_conf;
190 void **loc_conf; 189 void **loc_conf;
191 190
192 ngx_http_cache_t *cache; 191 ngx_http_cache_t *cache;
193 192
194 ngx_file_t file; 193 ngx_file_t file;
195 194
196 ngx_pool_t *pool; 195 ngx_pool_t *pool;
197 ngx_hunk_t *header_in; 196 ngx_hunk_t *header_in;
198 ngx_http_request_body_t *request_body;
199 197
200 ngx_http_headers_in_t headers_in; 198 ngx_http_headers_in_t headers_in;
201 ngx_http_headers_out_t headers_out; 199 ngx_http_headers_out_t headers_out;
202 200
203 time_t lingering_time; 201 ngx_http_request_body_t *request_body;
204 202
205 ngx_uint_t method; 203 #if 0
206 ngx_uint_t http_version;
207 ngx_uint_t http_major;
208 ngx_uint_t http_minor;
209
210 ngx_str_t request_line;
211 ngx_str_t uri;
212 ngx_str_t args;
213 ngx_str_t exten;
214 ngx_str_t unparsed_uri;
215
216 ngx_http_request_t *main;
217
218 uint32_t in_addr;
219 ngx_uint_t port;
220 ngx_str_t *port_name; /* ":80" */
221 ngx_str_t *server_name;
222 ngx_array_t *virtual_names;
223
224 ngx_uint_t phase;
225 ngx_int_t phase_handler;
226 ngx_http_handler_pt content_handler;
227
228 ngx_temp_file_t *temp_file; 204 ngx_temp_file_t *temp_file;
229 ngx_chain_t *request_hunks; 205 ngx_chain_t *request_hunks;
230 ngx_hunk_t *request_body_hunk; 206 ngx_hunk_t *request_body_hunk;
231 size_t remaining_body_len; 207 size_t remaining_body_len;
232 void (*request_body_handler) (void *data); 208 void (*request_body_handler) (void *data);
233 void *data; 209 void *data;
210 #endif
211
212 time_t lingering_time;
213
214 ngx_uint_t method;
215 ngx_uint_t http_version;
216 ngx_uint_t http_major;
217 ngx_uint_t http_minor;
218
219 ngx_str_t request_line;
220 ngx_str_t uri;
221 ngx_str_t args;
222 ngx_str_t exten;
223 ngx_str_t unparsed_uri;
224
225 ngx_http_request_t *main;
226
227 uint32_t in_addr;
228 ngx_uint_t port;
229 ngx_str_t *port_name; /* ":80" */
230 ngx_str_t *server_name;
231 ngx_array_t *virtual_names;
232
233 ngx_uint_t phase;
234 ngx_int_t phase_handler;
235 ngx_http_handler_pt content_handler;
234 236
235 ngx_array_t cleanup; 237 ngx_array_t cleanup;
236 238
239 /* used to learn the Apache compatible response length without a header */
237 size_t header_size; 240 size_t header_size;
238 241
239 u_char *discarded_buffer; 242 u_char *discarded_buffer;
240 void **err_ctx; 243 void **err_ctx;
241 ngx_uint_t err_status; 244 ngx_uint_t err_status;