Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 3214:798a7f1d3b2f
restore discard body handler after ngx_http_set_writer() set it to
ngx_http_test_reading(), the bug was introduced in r3050
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 19 Oct 2009 16:12:13 +0000 |
parents | 3ea03c1fe050 |
children | 4edf28522d24 |
comparison
equal
deleted
inserted
replaced
3213:7fc06314c684 | 3214:798a7f1d3b2f |
---|---|
2103 | 2103 |
2104 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | 2104 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |
2105 | 2105 |
2106 if (r->main->count != 1) { | 2106 if (r->main->count != 1) { |
2107 | 2107 |
2108 if (r->discard_body && r->lingering_time == 0) { | 2108 if (r->discard_body) { |
2109 r->lingering_time = ngx_time() | 2109 r->read_event_handler = ngx_http_discarded_request_body_handler; |
2110 r->write_event_handler = ngx_http_request_empty_handler; | |
2111 | |
2112 if (r->lingering_time == 0) { | |
2113 r->lingering_time = ngx_time() | |
2110 + (time_t) (clcf->lingering_time / 1000); | 2114 + (time_t) (clcf->lingering_time / 1000); |
2111 ngx_add_timer(r->connection->read, clcf->lingering_timeout); | 2115 ngx_add_timer(r->connection->read, clcf->lingering_timeout); |
2116 } | |
2112 } | 2117 } |
2113 | 2118 |
2114 ngx_http_close_request(r, 0); | 2119 ngx_http_close_request(r, 0); |
2115 return; | 2120 return; |
2116 } | 2121 } |