mirror of
https://github.com/nginx/nginx.git
synced 2025-06-09 19:12:47 +08:00
HTTP/2: skip data frames in case of internal errors.
This prevents possible processing of such frames and triggering rb->post_handler if an error occurred during r->request_body initialization.
This commit is contained in:
parent
f4df08b19d
commit
7458f66675
@ -3473,6 +3473,7 @@ ngx_http_v2_read_request_body(ngx_http_request_t *r,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rb->buf == NULL) {
|
if (rb->buf == NULL) {
|
||||||
|
stream->skip_data = 1;
|
||||||
return NGX_HTTP_INTERNAL_SERVER_ERROR;
|
return NGX_HTTP_INTERNAL_SERVER_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3494,6 +3495,7 @@ ngx_http_v2_read_request_body(ngx_http_request_t *r,
|
|||||||
stream->recv_window)
|
stream->recv_window)
|
||||||
== NGX_ERROR)
|
== NGX_ERROR)
|
||||||
{
|
{
|
||||||
|
stream->skip_data = 1;
|
||||||
return NGX_HTTP_INTERNAL_SERVER_ERROR;
|
return NGX_HTTP_INTERNAL_SERVER_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user