Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_proxy_module.c @ 653:7cbef16c71a1 release-0.3.48
nginx-0.3.48-RELEASE import
*) Change: now the ngx_http_charset_module works for subrequests, if
the response has no "Content-Type" header line.
*) Bugfix: if the "proxy_pass" directive has no URI part, then the
"proxy_redirect default" directive add the unnecessary slash in
start of the rewritten redirect.
*) Bugfix: the internal redirect always transform client's HTTP method
to GET, now the transformation is made for the "X-Accel-Redirect"
redirects only and if the method is not HEAD; the bug had appeared
in 0.3.42.
*) Bugfix: the ngx_http_perl_module could not be built, if the perl was
built with the threads support; the bug had appeared in 0.3.46.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 29 May 2006 17:28:12 +0000 |
parents | 39b7d7b33c91 |
children | 400711951595 |
comparison
equal
deleted
inserted
replaced
652:d01fc553611d | 653:7cbef16c71a1 |
---|---|
1347 | 1347 |
1348 p = data; | 1348 p = data; |
1349 | 1349 |
1350 p = ngx_copy(p, h->value.data, prefix); | 1350 p = ngx_copy(p, h->value.data, prefix); |
1351 | 1351 |
1352 p = ngx_copy(p, pr->replacement.text.data, pr->replacement.text.len); | 1352 if (pr->replacement.text.len) { |
1353 p = ngx_copy(p, pr->replacement.text.data, pr->replacement.text.len); | |
1354 } | |
1353 | 1355 |
1354 ngx_memcpy(p, h->value.data + prefix + pr->redirect.len, | 1356 ngx_memcpy(p, h->value.data + prefix + pr->redirect.len, |
1355 h->value.len - pr->redirect.len - prefix); | 1357 h->value.len - pr->redirect.len - prefix); |
1356 | 1358 |
1357 h->value.len = len; | 1359 h->value.len = len; |
1692 return NGX_CONF_ERROR; | 1694 return NGX_CONF_ERROR; |
1693 } | 1695 } |
1694 | 1696 |
1695 pr->handler = ngx_http_proxy_rewrite_redirect_text; | 1697 pr->handler = ngx_http_proxy_rewrite_redirect_text; |
1696 pr->redirect = conf->upstream.url; | 1698 pr->redirect = conf->upstream.url; |
1697 pr->replacement.text = conf->upstream.location; | 1699 |
1700 if (conf->upstream.uri.len) { | |
1701 pr->replacement.text = conf->upstream.location; | |
1702 | |
1703 } else { | |
1704 pr->replacement.text.len = 0; | |
1705 pr->replacement.text.data = NULL; | |
1706 } | |
1698 } | 1707 } |
1699 } | 1708 } |
1700 | 1709 |
1701 if (conf->upstream.hide_headers == NULL | 1710 if (conf->upstream.hide_headers == NULL |
1702 && conf->upstream.pass_headers == NULL) | 1711 && conf->upstream.pass_headers == NULL) |
2261 return NGX_CONF_ERROR; | 2270 return NGX_CONF_ERROR; |
2262 } | 2271 } |
2263 | 2272 |
2264 pr->handler = ngx_http_proxy_rewrite_redirect_text; | 2273 pr->handler = ngx_http_proxy_rewrite_redirect_text; |
2265 pr->redirect = plcf->upstream.url; | 2274 pr->redirect = plcf->upstream.url; |
2266 pr->replacement.text = plcf->upstream.location; | 2275 |
2276 if (plcf->upstream.uri.len) { | |
2277 pr->replacement.text = plcf->upstream.location; | |
2278 | |
2279 } else { | |
2280 pr->replacement.text.len = 0; | |
2281 pr->replacement.text.data = NULL; | |
2282 } | |
2267 | 2283 |
2268 return NGX_CONF_OK; | 2284 return NGX_CONF_OK; |
2269 } | 2285 } |
2270 | 2286 |
2271 if (ngx_http_script_variables_count(&value[2]) == 0) { | 2287 if (ngx_http_script_variables_count(&value[2]) == 0) { |