mirror of
https://github.com/nginx/nginx.git
synced 2026-06-11 09:52:43 -04:00
Merge b9ff619c79 into ca4f92a274
This commit is contained in:
commit
413a0ff7ba
2 changed files with 11 additions and 3 deletions
|
|
@ -3008,9 +3008,15 @@ ngx_http_set_write_handler(ngx_http_request_t *r)
|
|||
|
||||
r->http_state = NGX_HTTP_WRITING_REQUEST_STATE;
|
||||
|
||||
r->read_event_handler = r->discard_body ?
|
||||
ngx_http_discarded_request_body_handler:
|
||||
ngx_http_test_reading;
|
||||
r->read_event_handler =
|
||||
#if (NGX_HTTP_V2)
|
||||
r->stream ? ngx_http_test_reading :
|
||||
#endif
|
||||
#if (NGX_HTTP_V3)
|
||||
r->connection->quic ? ngx_http_test_reading :
|
||||
#endif
|
||||
r->discard_body ? ngx_http_discarded_request_body_handler :
|
||||
ngx_http_test_reading;
|
||||
r->write_event_handler = ngx_http_writer;
|
||||
|
||||
wev = r->connection->write;
|
||||
|
|
|
|||
|
|
@ -642,12 +642,14 @@ ngx_http_discard_request_body(ngx_http_request_t *r)
|
|||
#if (NGX_HTTP_V2)
|
||||
if (r->stream) {
|
||||
r->stream->skip_data = 1;
|
||||
r->discard_body = 1;
|
||||
return NGX_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (NGX_HTTP_V3)
|
||||
if (r->http_version == NGX_HTTP_VERSION_30) {
|
||||
r->discard_body = 1;
|
||||
return NGX_OK;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue