]> git.kaiwu.me - nginx.git/commitdiff
"proxy_redirect default" may not be used if a proxy_pass uses variables
authorIgor Sysoev <igor@sysoev.ru>
Wed, 10 Mar 2010 14:41:49 +0000 (14:41 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 10 Mar 2010 14:41:49 +0000 (14:41 +0000)
src/http/modules/ngx_http_proxy_module.c

index 7cb1cb8f2e9ccaf800156a85c4fa4408af09072c..23e1fe1988c81bf9f663c1b57c5be25c4c680ca8 100644 (file)
@@ -2754,6 +2754,13 @@ 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_redirect default\" must go "