summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules/ngx_http_proxy_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-08-14 20:02:09 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-08-14 20:02:09 +0000
commitd4eeedc3a0e5125ef1b1a1fed247318e5de0dcf1 (patch)
treed4a055745a104ae6a027b6b616b37d607e19f206 /src/http/modules/ngx_http_proxy_module.c
parentc7684f5afbcf859539add9b8e5bf52fad0717cf8 (diff)
downloadnginx-d4eeedc3a0e5125ef1b1a1fed247318e5de0dcf1.tar.gz
nginx-d4eeedc3a0e5125ef1b1a1fed247318e5de0dcf1.tar.bz2
r1354 merge:
named location
Diffstat (limited to 'src/http/modules/ngx_http_proxy_module.c')
-rw-r--r--src/http/modules/ngx_http_proxy_module.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index c999adea2..c8dca82ae 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -2275,13 +2275,17 @@ ngx_http_proxy_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
plcf->upstream.location = clcf->name;
+ if (clcf->named
#if (NGX_PCRE)
-
- if (clcf->regex || clcf->noname) {
+ || clcf->regex
+#endif
+ || clcf->noname)
+ {
if (plcf->upstream.uri.len) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"\"proxy_pass\" may not have URI part in "
"location given by regular expression, "
+ "or inside named location, "
"or inside the \"if\" statement, "
"or inside the \"limit_except\" block");
return NGX_CONF_ERROR;
@@ -2290,8 +2294,6 @@ ngx_http_proxy_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
plcf->upstream.location.len = 0;
}
-#endif
-
plcf->upstream.url = *url;
if (clcf->name.data[clcf->name.len - 1] == '/') {