diff options
| author | Ruslan Ermilov <ru@nginx.com> | 2016-12-22 11:58:52 +0300 |
|---|---|---|
| committer | Ruslan Ermilov <ru@nginx.com> | 2016-12-22 11:58:52 +0300 |
| commit | f02170672926e6afe273340fefb44bd1cc1d6ed4 (patch) | |
| tree | 73fab606ed909b5908874cf7132fcf6addbd5b8d /src/http/ngx_http_core_module.c | |
| parent | dd70e741970c841a1555911f6468b39870c0607b (diff) | |
| download | nginx-f02170672926e6afe273340fefb44bd1cc1d6ed4.tar.gz nginx-f02170672926e6afe273340fefb44bd1cc1d6ed4.tar.bz2 | |
Fixed missing "Location" field with some relative redirects.
Relative redirects did not work with directory redirects and
auto redirects issued by nginx.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
| -rw-r--r-- | src/http/ngx_http_core_module.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 685e72e4c..666d96fb3 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -983,10 +983,8 @@ ngx_http_core_find_config_phase(ngx_http_request_t *r, return NGX_OK; } - /* - * we do not need to set the r->headers_out.location->hash and - * r->headers_out.location->key fields - */ + r->headers_out.location->hash = 1; + ngx_str_set(&r->headers_out.location->key, "Location"); if (r->args.len == 0) { r->headers_out.location->value = clcf->name; |
