comparison src/http/modules/ngx_http_proxy_module.c @ 1353:7443fbe0b013

named location
author Igor Sysoev <igor@sysoev.ru>
date Sun, 29 Jul 2007 18:11:39 +0000
parents 50b6cd5bc2e2
children 943f2ba615cd
comparison
equal deleted inserted replaced
1352:e958b3cab51a 1353:7443fbe0b013
2274 2274
2275 clcf->handler = ngx_http_proxy_handler; 2275 clcf->handler = ngx_http_proxy_handler;
2276 2276
2277 plcf->upstream.location = clcf->name; 2277 plcf->upstream.location = clcf->name;
2278 2278
2279 if (clcf->named
2279 #if (NGX_PCRE) 2280 #if (NGX_PCRE)
2280 2281 || clcf->regex
2281 if (clcf->regex || clcf->noname) { 2282 #endif
2283 || clcf->noname)
2284 {
2282 if (plcf->upstream.uri.len) { 2285 if (plcf->upstream.uri.len) {
2283 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 2286 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
2284 "\"proxy_pass\" may not have URI part in " 2287 "\"proxy_pass\" may not have URI part in "
2285 "location given by regular expression, " 2288 "location given by regular expression, "
2289 "or inside named location, "
2286 "or inside the \"if\" statement, " 2290 "or inside the \"if\" statement, "
2287 "or inside the \"limit_except\" block"); 2291 "or inside the \"limit_except\" block");
2288 return NGX_CONF_ERROR; 2292 return NGX_CONF_ERROR;
2289 } 2293 }
2290 2294
2291 plcf->upstream.location.len = 0; 2295 plcf->upstream.location.len = 0;
2292 } 2296 }
2293
2294 #endif
2295 2297
2296 plcf->upstream.url = *url; 2298 plcf->upstream.url = *url;
2297 2299
2298 if (clcf->name.data[clcf->name.len - 1] == '/') { 2300 if (clcf->name.data[clcf->name.len - 1] == '/') {
2299 clcf->auto_redirect = 1; 2301 clcf->auto_redirect = 1;