Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2_filter_module.c @ 6760:9d61ecbe979e stable-1.10
HTTP/2: prevented output of the HEADERS frame for canceled streams.
It's useless to generate HEADERS if the stream has been canceled already.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Tue, 19 Jul 2016 20:22:44 +0300 |
parents | 155871d773cc |
children | 73e62bd2ce69 |
comparison
equal
deleted
inserted
replaced
6759:ee43fa9aff66 | 6760:9d61ecbe979e |
---|---|
167 | 167 |
168 if (r != r->main) { | 168 if (r != r->main) { |
169 return NGX_OK; | 169 return NGX_OK; |
170 } | 170 } |
171 | 171 |
172 fc = r->connection; | |
173 | |
174 if (fc->error) { | |
175 return NGX_ERROR; | |
176 } | |
177 | |
172 if (r->method == NGX_HTTP_HEAD) { | 178 if (r->method == NGX_HTTP_HEAD) { |
173 r->header_only = 1; | 179 r->header_only = 1; |
174 } | 180 } |
175 | 181 |
176 switch (r->headers_out.status) { | 182 switch (r->headers_out.status) { |
256 if (r->headers_out.last_modified == NULL | 262 if (r->headers_out.last_modified == NULL |
257 && r->headers_out.last_modified_time != -1) | 263 && r->headers_out.last_modified_time != -1) |
258 { | 264 { |
259 len += 1 + ngx_http_v2_literal_size("Wed, 31 Dec 1986 18:00:00 GMT"); | 265 len += 1 + ngx_http_v2_literal_size("Wed, 31 Dec 1986 18:00:00 GMT"); |
260 } | 266 } |
261 | |
262 fc = r->connection; | |
263 | 267 |
264 if (r->headers_out.location && r->headers_out.location->value.len) { | 268 if (r->headers_out.location && r->headers_out.location->value.len) { |
265 | 269 |
266 if (r->headers_out.location->value.data[0] == '/') { | 270 if (r->headers_out.location->value.data[0] == '/') { |
267 if (clcf->server_name_in_redirect) { | 271 if (clcf->server_name_in_redirect) { |