[PATCH 4 of 5] Proxy: fix error messages for proxy_redirect default
Maxim Dounin
mdounin at mdounin.ru
Fri Jan 15 14:49:31 MSK 2010
# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1263475311 -10800
# Node ID c003006f3f03505d329411b58db5c515d19de5b8
# Parent 5cc739cb96a7c5742d3b96415cafa8ef44afd1a4
Proxy: fix error messages for proxy_redirect default.
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -2754,9 +2754,16 @@ ngx_http_proxy_redirect(ngx_conf_t *cf,
}
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\" 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;
}
More information about the nginx-devel
mailing list