mirror of
https://github.com/nginx/nginx.git
synced 2024-11-24 04:49:01 +08:00
HTTP/2: prevented output of the HEADERS frame for canceled streams.
It's useless to generate HEADERS if the stream has been canceled already.
This commit is contained in:
parent
e1d2701785
commit
8c1a6ae2ad
@ -169,6 +169,12 @@ ngx_http_v2_header_filter(ngx_http_request_t *r)
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
fc = r->connection;
|
||||
|
||||
if (fc->error) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (r->method == NGX_HTTP_HEAD) {
|
||||
r->header_only = 1;
|
||||
}
|
||||
@ -259,8 +265,6 @@ ngx_http_v2_header_filter(ngx_http_request_t *r)
|
||||
len += 1 + ngx_http_v2_literal_size("Wed, 31 Dec 1986 18:00:00 GMT");
|
||||
}
|
||||
|
||||
fc = r->connection;
|
||||
|
||||
if (r->headers_out.location && r->headers_out.location->value.len) {
|
||||
|
||||
if (r->headers_out.location->value.data[0] == '/') {
|
||||
|
Loading…
Reference in New Issue
Block a user