comparison src/http/ngx_http_request.c @ 86:962c43960644 NGINX_0_1_43

nginx 0.1.43 *) Feature: the listen(2) backlog in the "listen" directive can be changed using the -HUP signal. *) Feature: the geo2nginx.pl script was added to contrib. *) Change: the FastCGI parameters with the empty values now are passed to a server. *) Bugfix: the segmentation fault occurred or the worker process may got caught in an endless loop if the proxied or FastCGI server sent the "Cache-Control" header line and the "expires" directive was used; in the proxied mode the bug appeared in 0.1.29.
author Igor Sysoev <http://sysoev.ru>
date Tue, 30 Aug 2005 00:00:00 +0400
parents 991c6e4c7654
children e916a291e9aa
comparison
equal deleted inserted replaced
85:ed21d13ec23c 86:962c43960644
635 635
636 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, 636 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
637 "http exten: \"%V\"", &r->exten); 637 "http exten: \"%V\"", &r->exten);
638 638
639 if (r->http_version < NGX_HTTP_VERSION_10) { 639 if (r->http_version < NGX_HTTP_VERSION_10) {
640
641 if (rev->timer_set) {
642 ngx_del_timer(rev);
643 }
644
645 #if (NGX_STAT_STUB)
646 ngx_atomic_dec(ngx_stat_reading);
647 r->stat_reading = 0;
648 ngx_atomic_inc(ngx_stat_writing);
649 r->stat_writing = 1;
650 #endif
651
652 rev->handler = ngx_http_request_handler;
653 c->write->handler = ngx_http_request_handler;
640 r->read_event_handler = ngx_http_block_read; 654 r->read_event_handler = ngx_http_block_read;
655
641 ngx_http_handler(r); 656 ngx_http_handler(r);
657
642 return; 658 return;
643 } 659 }
644 660
645 661
646 if (ngx_list_init(&r->headers_in.headers, r->pool, 20, 662 if (ngx_list_init(&r->headers_in.headers, r->pool, 20,
866 rev->handler = ngx_http_request_handler; 882 rev->handler = ngx_http_request_handler;
867 c->write->handler = ngx_http_request_handler; 883 c->write->handler = ngx_http_request_handler;
868 r->read_event_handler = ngx_http_block_read; 884 r->read_event_handler = ngx_http_block_read;
869 885
870 ngx_http_handler(r); 886 ngx_http_handler(r);
887
871 return; 888 return;
872 } 889 }
873 890
874 if (rc == NGX_AGAIN) { 891 if (rc == NGX_AGAIN) {
875 892
1780 } 1797 }
1781 1798
1782 if (r->headers_in.content_length_n <= 0) { 1799 if (r->headers_in.content_length_n <= 0) {
1783 return NGX_OK; 1800 return NGX_OK;
1784 } 1801 }
1802
1803 r->discard_body = 1;
1785 1804
1786 size = r->header_in->last - r->header_in->pos; 1805 size = r->header_in->last - r->header_in->pos;
1787 1806
1788 if (size) { 1807 if (size) {
1789 if (r->headers_in.content_length_n > size) { 1808 if (r->headers_in.content_length_n > size) {