mirror of
https://github.com/nginx/nginx.git
synced 2025-06-10 19:42:39 +08:00
HTTP/2: don't send WINDOW_UPDATE for an empty request body.
Particularly this prevents sending WINDOW_UPDATE with zero delta which can result in PROTOCOL_ERROR. Also removed surplus setting of no_flow_control to 0.
This commit is contained in:
parent
eeb72127cf
commit
f4df08b19d
@ -3481,8 +3481,8 @@ ngx_http_v2_read_request_body(ngx_http_request_t *r,
|
|||||||
return ngx_http_v2_process_request_body(r, NULL, 0, 1);
|
return ngx_http_v2_process_request_body(r, NULL, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (len) {
|
||||||
if (r->request_body_no_buffering) {
|
if (r->request_body_no_buffering) {
|
||||||
stream->no_flow_control = 0;
|
|
||||||
stream->recv_window = (size_t) len;
|
stream->recv_window = (size_t) len;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -3496,6 +3496,7 @@ ngx_http_v2_read_request_body(ngx_http_request_t *r,
|
|||||||
{
|
{
|
||||||
return NGX_HTTP_INTERNAL_SERVER_ERROR;
|
return NGX_HTTP_INTERNAL_SERVER_ERROR;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ngx_add_timer(r->connection->read, clcf->client_body_timeout);
|
ngx_add_timer(r->connection->read, clcf->client_body_timeout);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user