Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_proxy_module.c @ 3580:667c22171519 stable-0.7
merge r3452, r3462, r3471, r3472:
fix miscellaneous name bugs:
*) fix $upstream_http_ variable prefix length
*) use a right "Location" header name, however, it did not harm,
since ngx_http_variable_sent_location() never use key name field
*) fix proxy_redirect name in error message
*) "proxy_redirect default" may not be used if a proxy_pass uses variables
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 07 Jun 2010 09:36:33 +0000 |
parents | 3354dfba9da4 |
children | 1c2e8b92751d |
comparison
equal
deleted
inserted
replaced
3579:d612c9374453 | 3580:667c22171519 |
---|---|
1904 * conf->headers_set = NULL; | 1904 * conf->headers_set = NULL; |
1905 * conf->headers_set_hash = NULL; | 1905 * conf->headers_set_hash = NULL; |
1906 * conf->body_set_len = NULL; | 1906 * conf->body_set_len = NULL; |
1907 * conf->body_set = NULL; | 1907 * conf->body_set = NULL; |
1908 * conf->body_source = { 0, NULL }; | 1908 * conf->body_source = { 0, NULL }; |
1909 * conf->rewrite_locations = NULL; | 1909 * conf->redirects = NULL; |
1910 */ | 1910 */ |
1911 | 1911 |
1912 conf->upstream.store = NGX_CONF_UNSET; | 1912 conf->upstream.store = NGX_CONF_UNSET; |
1913 conf->upstream.store_access = NGX_CONF_UNSET_UINT; | 1913 conf->upstream.store_access = NGX_CONF_UNSET_UINT; |
1914 conf->upstream.buffering = NGX_CONF_UNSET; | 1914 conf->upstream.buffering = NGX_CONF_UNSET; |
2745 if (pr == NULL) { | 2745 if (pr == NULL) { |
2746 return NGX_CONF_ERROR; | 2746 return NGX_CONF_ERROR; |
2747 } | 2747 } |
2748 | 2748 |
2749 if (ngx_strcmp(value[1].data, "default") == 0) { | 2749 if (ngx_strcmp(value[1].data, "default") == 0) { |
2750 if (plcf->proxy_lengths) { | |
2751 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
2752 "\"proxy_redirect default\" may not be used " | |
2753 "with \"proxy_pass\" directive with variables"); | |
2754 return NGX_CONF_ERROR; | |
2755 } | |
2756 | |
2750 if (plcf->url.data == NULL) { | 2757 if (plcf->url.data == NULL) { |
2751 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 2758 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
2752 "\"proxy_rewrite_location default\" must go " | 2759 "\"proxy_redirect default\" must go " |
2753 "after the \"proxy_pass\" directive"); | 2760 "after the \"proxy_pass\" directive"); |
2754 return NGX_CONF_ERROR; | 2761 return NGX_CONF_ERROR; |
2755 } | 2762 } |
2756 | 2763 |
2757 pr->handler = ngx_http_proxy_rewrite_redirect_text; | 2764 pr->handler = ngx_http_proxy_rewrite_redirect_text; |