Mercurial > hg > nginx-quic
comparison src/http/ngx_http_core_module.c @ 152:fb48bf4fea1c
nginx-0.0.1-2003-10-21-11:47:21 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 21 Oct 2003 07:47:21 +0000 |
parents | 5afee0074707 |
children | c71aeb75c071 |
comparison
equal
deleted
inserted
replaced
151:2d9e4a8b6d11 | 152:fb48bf4fea1c |
---|---|
205 r->connection->unexpected_eof = 0; | 205 r->connection->unexpected_eof = 0; |
206 | 206 |
207 lcx = r->connection->log->data; | 207 lcx = r->connection->log->data; |
208 lcx->action = NULL; | 208 lcx->action = NULL; |
209 | 209 |
210 /* STUB */ | |
210 r->keepalive = 1; | 211 r->keepalive = 1; |
212 if (r->headers_in.connection) { | |
213 if (r->headers_in.connection->value.len == 5 | |
214 && ngx_strcasecmp(r->headers_in.connection->value.data, "close") | |
215 == 0) | |
216 { | |
217 r->keepalive = 0; | |
218 } | |
219 } | |
220 | |
221 #if 0 | |
222 /* TEST STUB */ r->keepalive = 0; | |
223 #endif | |
211 | 224 |
212 if (r->headers_in.content_length_n > 0) { | 225 if (r->headers_in.content_length_n > 0) { |
213 r->lingering_close = 1; | 226 r->lingering_close = 1; |
214 } | 227 |
215 | 228 } else { |
229 r->lingering_close = 0; | |
230 } | |
231 | |
232 #if 0 | |
216 /* TEST STUB */ r->lingering_close = 1; | 233 /* TEST STUB */ r->lingering_close = 1; |
234 #endif | |
217 | 235 |
218 r->connection->write->event_handler = ngx_http_phase_event_handler; | 236 r->connection->write->event_handler = ngx_http_phase_event_handler; |
219 | 237 |
220 ngx_http_run_phases(r); | 238 ngx_http_run_phases(r); |
221 | 239 |
256 r->phase_handler >= 0; | 274 r->phase_handler >= 0; |
257 r->phase_handler--) | 275 r->phase_handler--) |
258 { | 276 { |
259 rc = h[r->phase_handler](r); | 277 rc = h[r->phase_handler](r); |
260 | 278 |
279 if (rc == NGX_DONE) { | |
280 return; | |
281 } | |
282 | |
283 /* TODO THINK: is it dupliate NGX_DONE ??? */ | |
261 if (r->closed) { | 284 if (r->closed) { |
262 return; | 285 return; |
263 } | 286 } |
264 | 287 |
265 if (rc == NGX_DECLINED) { | 288 if (rc == NGX_DECLINED) { |
433 r->phase = 0; | 456 r->phase = 0; |
434 r->phase_handler = 0; | 457 r->phase_handler = 0; |
435 | 458 |
436 ngx_http_handler(r); | 459 ngx_http_handler(r); |
437 | 460 |
438 return NGX_OK; | 461 return NGX_DONE; |
439 } | 462 } |
440 | 463 |
441 | 464 |
442 #if 1 /* STUB: test the delay http handler */ | 465 #if 1 /* STUB: test the delay http handler */ |
443 | 466 |