diff src/http/modules/proxy/ngx_http_proxy_handler.c @ 396:6f3b20c1ac50

nginx-0.0.7-2004-07-18-23:11:20 import
author Igor Sysoev <igor@sysoev.ru>
date Sun, 18 Jul 2004 19:11:20 +0000
parents 73688d5d7fc3
children 0526206251f6
line wrap: on
line diff
--- 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
     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
                     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;
     }