diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-10-11 15:07:03 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-10-11 15:07:03 +0000 |
commit | 924bd79e317e9a137c0d1b9d349185758a628ec4 (patch) | |
tree | f877c8b19e53e7d0a7683e3dd9aeb713146c4a8f /src/http/modules/proxy/ngx_http_proxy_header.c | |
parent | aef13d7f6660f4f8d2c50c95b8e182e62c115f88 (diff) | |
download | nginx-924bd79e317e9a137c0d1b9d349185758a628ec4.tar.gz nginx-924bd79e317e9a137c0d1b9d349185758a628ec4.zip |
nginx-0.1.1-RELEASE importrelease-0.1.1
*) Feature: the gzip_types directive.
*) Feature: the tcp_nodelay directive.
*) Feature: the send_lowat directive is working not only on OSes that
support kqueue NOTE_LOWAT, but also on OSes that support SO_SNDLOWAT.
*) Feature: the setproctitle() emulation for Linux and Solaris.
*) Bugfix: the "Location" header rewrite bug fixed while the proxying.
*) Bugfix: the ngx_http_chunked_module module may get caught in an
endless loop.
*) Bugfix: the /dev/poll module bugs fixed.
*) Bugfix: the responses were corrupted when the temporary files were
used while the proxying.
*) Bugfix: the unescaped requests were passed to the backend.
*) Bugfix: while the build configuration on Linux 2.4 the
--with-poll_module parameter was required.
Diffstat (limited to 'src/http/modules/proxy/ngx_http_proxy_header.c')
-rw-r--r-- | src/http/modules/proxy/ngx_http_proxy_header.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/http/modules/proxy/ngx_http_proxy_header.c b/src/http/modules/proxy/ngx_http_proxy_header.c index 038001240..07722fc89 100644 --- a/src/http/modules/proxy/ngx_http_proxy_header.c +++ b/src/http/modules/proxy/ngx_http_proxy_header.c @@ -164,24 +164,26 @@ static int ngx_http_proxy_rewrite_location_header(ngx_http_proxy_ctx_t *p, return NGX_ERROR; } - /* - * we do not set r->headers_out.location to avoid the handling - * the local redirects without a host name by ngx_http_header_filter() - */ - -#if 0 - r->headers_out.location = location; -#endif - if (uc->url.len > loc->value.len || ngx_rstrncmp(loc->value.data, uc->url.data, uc->url.len) != 0) { + + /* + * we do not set r->headers_out.location here to avoid the handling + * the local redirects without a host name by ngx_http_header_filter() + */ + *location = *loc; return NGX_OK; } /* TODO: proxy_reverse */ + r->headers_out.location = location; + + location->key.len = 0; + location->key.data = NULL; + location->value.len = uc->location->len + (loc->value.len - uc->url.len) + 1; if (!(location->value.data = ngx_palloc(r->pool, location->value.len))) { |