Mercurial > hg > nginx-mail
diff src/http/modules/ngx_http_proxy_module.c @ 589:e19e5f542878 NGINX_0_8_25
nginx 0.8.25
*) Change: now no message is written in an error log if a variable is
not found by $r->variable() method.
*) Feature: the ngx_http_degradation_module.
*) Feature: regular expression named captures.
*) Feature: now URI part is not required a "proxy_pass" directive if
variables are used.
*) Feature: now the "msie_padding" directive works for Chrome too.
*) Bugfix: a segmentation fault occurred in a worker process on low
memory condition; the bug had appeared in 0.8.18.
*) Bugfix: nginx sent gzipped responses to clients those do not support
gzip, if "gzip_static on" and "gzip_vary off"; the bug had appeared
in 0.8.16.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 16 Nov 2009 00:00:00 +0300 |
parents | c04fa65fe604 |
children | 5c576ea5dbd9 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -724,17 +724,22 @@ ngx_http_proxy_eval(ngx_http_request_t * return NGX_ERROR; } - if (url.uri.len && url.uri.data[0] == '?') { - p = ngx_pnalloc(r->pool, url.uri.len + 1); - if (p == NULL) { - return NGX_ERROR; + if (url.uri.len) { + if (url.uri.data[0] == '?') { + p = ngx_pnalloc(r->pool, url.uri.len + 1); + if (p == NULL) { + return NGX_ERROR; + } + + *p++ = '/'; + ngx_memcpy(p, url.uri.data, url.uri.len); + + url.uri.len++; + url.uri.data = p - 1; } - *p++ = '/'; - ngx_memcpy(p, url.uri.data, url.uri.len); - - url.uri.len++; - url.uri.data = p - 1; + } else { + url.uri = r->unparsed_uri; } ctx->vars.key_start = u->schema;