Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 6853:c85dfd99a2dd
Fixed missing "Location" field with some relative redirects.
Relative redirects did not work with directory redirects and
auto redirects issued by nginx.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 22 Dec 2016 11:58:52 +0300 |
parents | d15172ebb400 |
children | 25203fc377fb |
comparison
equal
deleted
inserted
replaced
6852:d15172ebb400 | 6853:c85dfd99a2dd |
---|---|
981 if (r->headers_out.location == NULL) { | 981 if (r->headers_out.location == NULL) { |
982 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 982 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
983 return NGX_OK; | 983 return NGX_OK; |
984 } | 984 } |
985 | 985 |
986 /* | 986 r->headers_out.location->hash = 1; |
987 * we do not need to set the r->headers_out.location->hash and | 987 ngx_str_set(&r->headers_out.location->key, "Location"); |
988 * r->headers_out.location->key fields | |
989 */ | |
990 | 988 |
991 if (r->args.len == 0) { | 989 if (r->args.len == 0) { |
992 r->headers_out.location->value = clcf->name; | 990 r->headers_out.location->value = clcf->name; |
993 | 991 |
994 } else { | 992 } else { |