diff options
| author | Valentin Bartenev <vbart@nginx.com> | 2016-07-19 20:22:44 +0300 |
|---|---|---|
| committer | Valentin Bartenev <vbart@nginx.com> | 2016-07-19 20:22:44 +0300 |
| commit | 8c1a6ae2ad4612f8e2365b0c2568223ae49dbf33 (patch) | |
| tree | 7bce7eb275777421b08daf313f2b53518c92cd05 /src | |
| parent | e1d2701785d4a48da615cb53c48907bfffc4155b (diff) | |
| download | nginx-8c1a6ae2ad4612f8e2365b0c2568223ae49dbf33.tar.gz nginx-8c1a6ae2ad4612f8e2365b0c2568223ae49dbf33.tar.bz2 | |
HTTP/2: prevented output of the HEADERS frame for canceled streams.
It's useless to generate HEADERS if the stream has been canceled already.
Diffstat (limited to 'src')
| -rw-r--r-- | src/http/v2/ngx_http_v2_filter_module.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/http/v2/ngx_http_v2_filter_module.c b/src/http/v2/ngx_http_v2_filter_module.c index caa835dec..8b9153801 100644 --- a/src/http/v2/ngx_http_v2_filter_module.c +++ b/src/http/v2/ngx_http_v2_filter_module.c @@ -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] == '/') { |
