diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-07-29 22:11:39 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2007-07-29 22:11:39 +0400 |
commit | 8889b65711cc93dfdbbd570384fe2e39391cc94e (patch) | |
tree | 1ec9dc6fe20145da12412864d30eae44be7358ed /src/http/modules/ngx_http_proxy_module.c | |
parent | a1df416d65167dcb6e472ae11a00ef67e770acec (diff) |
named location
Diffstat (limited to 'src/http/modules/ngx_http_proxy_module.c')
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 10 |
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 0828264de..52f67b305 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -2276,13 +2276,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; @@ -2291,8 +2295,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] == '/') { |