diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2010-06-07 09:36:33 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2010-06-07 09:36:33 +0000 |
| commit | 149578df888a43b592c5efc4fb2e0441dbd5a9ff (patch) | |
| tree | c1a80c088abad460411574fbfecc1663cfd738ad /src/http/modules/ngx_http_proxy_module.c | |
| parent | 3b755fc6c441867122a6fe575152a52be48d1eb0 (diff) | |
| download | nginx-149578df888a43b592c5efc4fb2e0441dbd5a9ff.tar.gz nginx-149578df888a43b592c5efc4fb2e0441dbd5a9ff.tar.bz2 | |
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
Diffstat (limited to 'src/http/modules/ngx_http_proxy_module.c')
| -rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index 19dbd5cfc..03750784c 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -1906,7 +1906,7 @@ ngx_http_proxy_create_loc_conf(ngx_conf_t *cf) * conf->body_set_len = NULL; * conf->body_set = NULL; * conf->body_source = { 0, NULL }; - * conf->rewrite_locations = NULL; + * conf->redirects = NULL; */ conf->upstream.store = NGX_CONF_UNSET; @@ -2747,9 +2747,16 @@ ngx_http_proxy_redirect(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) } if (ngx_strcmp(value[1].data, "default") == 0) { + if (plcf->proxy_lengths) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "\"proxy_redirect default\" may not be used " + "with \"proxy_pass\" directive with variables"); + return NGX_CONF_ERROR; + } + if (plcf->url.data == NULL) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "\"proxy_rewrite_location default\" must go " + "\"proxy_redirect default\" must go " "after the \"proxy_pass\" directive"); return NGX_CONF_ERROR; } |
