comparison src/http/v2/ngx_http_v2_filter_module.c @ 6637:699e409a3e0c

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 6f69e3c0f780
children a2b310a8b2af
comparison
equal deleted inserted replaced
6636:ea284434db0f 6637:699e409a3e0c
163 163
164 if (r != r->main) { 164 if (r != r->main) {
165 return NGX_OK; 165 return NGX_OK;
166 } 166 }
167 167
168 fc = r->connection;
169
170 if (fc->error) {
171 return NGX_ERROR;
172 }
173
168 if (r->method == NGX_HTTP_HEAD) { 174 if (r->method == NGX_HTTP_HEAD) {
169 r->header_only = 1; 175 r->header_only = 1;
170 } 176 }
171 177
172 switch (r->headers_out.status) { 178 switch (r->headers_out.status) {
252 if (r->headers_out.last_modified == NULL 258 if (r->headers_out.last_modified == NULL
253 && r->headers_out.last_modified_time != -1) 259 && r->headers_out.last_modified_time != -1)
254 { 260 {
255 len += 1 + ngx_http_v2_literal_size("Wed, 31 Dec 1986 18:00:00 GMT"); 261 len += 1 + ngx_http_v2_literal_size("Wed, 31 Dec 1986 18:00:00 GMT");
256 } 262 }
257
258 fc = r->connection;
259 263
260 if (r->headers_out.location && r->headers_out.location->value.len) { 264 if (r->headers_out.location && r->headers_out.location->value.len) {
261 265
262 if (r->headers_out.location->value.data[0] == '/') { 266 if (r->headers_out.location->value.data[0] == '/') {
263 if (clcf->server_name_in_redirect) { 267 if (clcf->server_name_in_redirect) {