Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_module.c @ 1395:bf5b86d5f00e stable-0.5
r1354 merge:
named location
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 14 Aug 2007 20:02:09 +0000 |
parents | d59617e7e6a1 |
children | 840b81d13a2f |
comparison
equal
deleted
inserted
replaced
1384:6485121a080d | 1395:bf5b86d5f00e |
---|---|
2273 | 2273 |
2274 clcf->handler = ngx_http_proxy_handler; | 2274 clcf->handler = ngx_http_proxy_handler; |
2275 | 2275 |
2276 plcf->upstream.location = clcf->name; | 2276 plcf->upstream.location = clcf->name; |
2277 | 2277 |
2278 if (clcf->named | |
2278 #if (NGX_PCRE) | 2279 #if (NGX_PCRE) |
2279 | 2280 || clcf->regex |
2280 if (clcf->regex || clcf->noname) { | 2281 #endif |
2282 || clcf->noname) | |
2283 { | |
2281 if (plcf->upstream.uri.len) { | 2284 if (plcf->upstream.uri.len) { |
2282 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 2285 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
2283 "\"proxy_pass\" may not have URI part in " | 2286 "\"proxy_pass\" may not have URI part in " |
2284 "location given by regular expression, " | 2287 "location given by regular expression, " |
2288 "or inside named location, " | |
2285 "or inside the \"if\" statement, " | 2289 "or inside the \"if\" statement, " |
2286 "or inside the \"limit_except\" block"); | 2290 "or inside the \"limit_except\" block"); |
2287 return NGX_CONF_ERROR; | 2291 return NGX_CONF_ERROR; |
2288 } | 2292 } |
2289 | 2293 |
2290 plcf->upstream.location.len = 0; | 2294 plcf->upstream.location.len = 0; |
2291 } | 2295 } |
2292 | |
2293 #endif | |
2294 | 2296 |
2295 plcf->upstream.url = *url; | 2297 plcf->upstream.url = *url; |
2296 | 2298 |
2297 if (clcf->name.data[clcf->name.len - 1] == '/') { | 2299 if (clcf->name.data[clcf->name.len - 1] == '/') { |
2298 clcf->auto_redirect = 1; | 2300 clcf->auto_redirect = 1; |