This repository was archived by the owner on Apr 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -302,6 +302,12 @@ ngx_int_t ps_base_fetch_handler(ngx_http_request_t* r) {
302
302
STR_CASE_EQ_LITERAL (header->key , " Last-Modified" ) ||
303
303
STR_CASE_EQ_LITERAL (header->key , " Expires" ))))) {
304
304
header->hash = 0 ;
305
+ if (STR_CASE_EQ_LITERAL (header->key , " Location" )) {
306
+ // There's a possible issue with the location header, where setting
307
+ // the hash to 0 is not enough. See:
308
+ // https://github.com/nginx/nginx/blob/master/src/http/ngx_http_header_filter_module.c#L314
309
+ r->headers_out .location = NULL ;
310
+ }
305
311
}
306
312
}
307
313
} else {
@@ -452,11 +458,6 @@ void copy_response_headers_from_ngx(const ngx_http_request_t* r,
452
458
453
459
headers->set_status_code (r->headers_out .status );
454
460
455
- if (r->headers_out .location != NULL ) {
456
- headers->Add (HttpAttributes::kLocation ,
457
- str_to_string_piece (r->headers_out .location ->value ));
458
- }
459
-
460
461
// Manually copy over the content type because it's not included in
461
462
// request_->headers_out.headers.
462
463
headers->Add (HttpAttributes::kContentType ,
You can’t perform that action at this time.
0 commit comments