aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/proxy/ngx_http_proxy_handler.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-07-18 19:11:20 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-07-18 19:11:20 +0000
commit74a5ddb47aef86bb07336713bb1ace0007c2d452 (patch)
tree449c6ceb229b7646ef40417135c66843a677746b /src/http/modules/proxy/ngx_http_proxy_handler.c
parentf38e046a0a2e7437f8232ef2a99cead69c4b9ebb (diff)
downloadnginx-74a5ddb47aef86bb07336713bb1ace0007c2d452.tar.gz
nginx-74a5ddb47aef86bb07336713bb1ace0007c2d452.zip
nginx-0.0.7-2004-07-18-23:11:20 import
Diffstat (limited to 'src/http/modules/proxy/ngx_http_proxy_handler.c')
-rw-r--r--src/http/modules/proxy/ngx_http_proxy_handler.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/http/modules/proxy/ngx_http_proxy_handler.c b/src/http/modules/proxy/ngx_http_proxy_handler.c
index 4f8fbda67..711aad2f4 100644
--- a/src/http/modules/proxy/ngx_http_proxy_handler.c
+++ b/src/http/modules/proxy/ngx_http_proxy_handler.c
@@ -1062,7 +1062,6 @@ static char *ngx_http_proxy_set_pass(ngx_conf_t *cf, ngx_command_t *cmd,
in_addr_t addr;
ngx_str_t *value;
struct hostent *h;
- ngx_http_conf_ctx_t *ctx;
ngx_http_core_loc_conf_t *clcf;
@@ -1177,10 +1176,11 @@ static char *ngx_http_proxy_set_pass(ngx_conf_t *cf, ngx_command_t *cmd,
lcf->upstream->port_text.len + 1);
}
- ctx = cf->ctx;
- clcf = ctx->loc_conf[ngx_http_core_module.ctx_index];
+ clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
+
lcf->upstream->location = &clcf->name;
clcf->handler = ngx_http_proxy_handler;
+
if (clcf->name.data[clcf->name.len - 1] == '/') {
clcf->auto_redirect = 1;
}