Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 344:e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 01 Jun 2004 06:04:46 +0000 |
parents | 6bdf858bff8c |
children | 55e496a8ece3 |
comparison
equal
deleted
inserted
replaced
343:6bdf858bff8c | 344:e366ba5db8f8 |
---|---|
90 /* STUB: epoll edge */ c->write->event_handler = ngx_http_empty_handler; | 90 /* STUB: epoll edge */ c->write->event_handler = ngx_http_empty_handler; |
91 | 91 |
92 if (rev->ready) { | 92 if (rev->ready) { |
93 /* deferred accept, aio, iocp */ | 93 /* deferred accept, aio, iocp */ |
94 | 94 |
95 if (*ngx_accept_mutex) { | 95 if (ngx_accept_mutex) { |
96 if (ngx_mutex_lock(ngx_posted_events_mutex) == NGX_ERROR) { | 96 if (ngx_mutex_lock(ngx_posted_events_mutex) == NGX_ERROR) { |
97 ngx_http_close_connection(c); | 97 ngx_http_close_connection(c); |
98 return; | 98 return; |
99 } | 99 } |
100 | 100 |
560 | 560 |
561 if (r->header_in->last == r->header_in->end) { | 561 if (r->header_in->last == r->header_in->end) { |
562 | 562 |
563 /* | 563 /* |
564 * If it's a pipelined request and a request line is not complete | 564 * If it's a pipelined request and a request line is not complete |
565 * then we have to copy it to the start of the r->header_in hunk. | 565 * then we have to copy it to the start of the r->header_in buf. |
566 * We have to copy it here only if the large client headers | 566 * We have to copy it here only if the large client headers |
567 * are enabled otherwise a request line had been already copied | 567 * are enabled otherwise a request line had been already copied |
568 * to the start of the r->header_in hunk in ngx_http_set_keepalive(). | 568 * to the start of the r->header_in buf in ngx_http_set_keepalive(). |
569 */ | 569 */ |
570 | 570 |
571 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); | 571 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); |
572 | 572 |
573 if (cscf->large_client_header) { | 573 if (cscf->large_client_header) { |
755 | 755 |
756 /* NGX_AGAIN: a header line parsing is still not complete */ | 756 /* NGX_AGAIN: a header line parsing is still not complete */ |
757 | 757 |
758 if (r->header_in->last == r->header_in->end) { | 758 if (r->header_in->last == r->header_in->end) { |
759 | 759 |
760 /* if the large client headers are enabled then | 760 /* |
761 we need to compact r->header_in hunk */ | 761 * if the large client headers are enabled then |
762 * we need to compact r->header_in buf | |
763 */ | |
762 | 764 |
763 if (cscf->large_client_header) { | 765 if (cscf->large_client_header) { |
764 offset = r->header_name_start - r->header_in->start; | 766 offset = r->header_name_start - r->header_in->start; |
765 | 767 |
766 if (offset == 0) { | 768 if (offset == 0) { |
1313 } | 1315 } |
1314 } | 1316 } |
1315 | 1317 |
1316 ctx->action = "keepalive"; | 1318 ctx->action = "keepalive"; |
1317 | 1319 |
1318 if (c->tcp_nopush == 1) { | 1320 if (c->tcp_nopush == NGX_TCP_NOPUSH_SET) { |
1319 if (ngx_tcp_push(c->fd) == NGX_ERROR) { | 1321 if (ngx_tcp_push(c->fd) == NGX_ERROR) { |
1320 ngx_connection_error(c, ngx_socket_errno, ngx_tcp_push_n " failed"); | 1322 ngx_connection_error(c, ngx_socket_errno, ngx_tcp_push_n " failed"); |
1321 ngx_http_close_connection(c); | 1323 ngx_http_close_connection(c); |
1322 return; | 1324 return; |
1323 } | 1325 } |
1324 c->tcp_nopush = 0; | 1326 c->tcp_nopush = NGX_TCP_NOPUSH_UNSET; |
1325 } | 1327 } |
1326 | 1328 |
1327 if (rev->ready) { | 1329 if (rev->ready) { |
1328 ngx_http_keepalive_handler(rev); | 1330 ngx_http_keepalive_handler(rev); |
1329 } | 1331 } |