diff options
Diffstat (limited to '')
| -rw-r--r-- | src/http/ngx_http_request.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index c6a580948..b8e97d2a7 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -637,8 +637,24 @@ ngx_http_process_request_line(ngx_event_t *rev) "http exten: \"%V\"", &r->exten); if (r->http_version < NGX_HTTP_VERSION_10) { + + if (rev->timer_set) { + ngx_del_timer(rev); + } + +#if (NGX_STAT_STUB) + ngx_atomic_dec(ngx_stat_reading); + r->stat_reading = 0; + ngx_atomic_inc(ngx_stat_writing); + r->stat_writing = 1; +#endif + + rev->handler = ngx_http_request_handler; + c->write->handler = ngx_http_request_handler; r->read_event_handler = ngx_http_block_read; + ngx_http_handler(r); + return; } @@ -868,6 +884,7 @@ ngx_http_process_request_headers(ngx_event_t *rev) r->read_event_handler = ngx_http_block_read; ngx_http_handler(r); + return; } @@ -1783,6 +1800,8 @@ ngx_http_discard_body(ngx_http_request_t *r) return NGX_OK; } + r->discard_body = 1; + size = r->header_in->last - r->header_in->pos; if (size) { |
