diff options
| author | 2013-06-01 16:12:54 +0000 | |
|---|---|---|
| committer | 2013-06-01 16:12:54 +0000 | |
| commit | d8dc9a5250771aed5ee92cbc434097082ef103f1 (patch) | |
| tree | 1d1294b5132ddb61207c9fcb594f00810c3fdb69 /usr.sbin/nginx/src/http/modules/ngx_http_geo_module.c | |
| parent | As found by kurt, there's a twisty race between exit1 and fork1 (diff) | |
| download | wireguard-openbsd-d8dc9a5250771aed5ee92cbc434097082ef103f1.tar.xz wireguard-openbsd-d8dc9a5250771aed5ee92cbc434097082ef103f1.zip | |
update to nginx-1.4.1 and enable the SPDY module by default
Diffstat (limited to 'usr.sbin/nginx/src/http/modules/ngx_http_geo_module.c')
| -rw-r--r-- | usr.sbin/nginx/src/http/modules/ngx_http_geo_module.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_geo_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_geo_module.c index a927ab798c1..34c3b190d18 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_geo_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_geo_module.c @@ -314,18 +314,17 @@ static ngx_int_t ngx_http_geo_addr(ngx_http_request_t *r, ngx_http_geo_ctx_t *ctx, ngx_addr_t *addr) { - ngx_table_elt_t *xfwd; + ngx_array_t *xfwd; if (ngx_http_geo_real_addr(r, ctx, addr) != NGX_OK) { return NGX_ERROR; } - xfwd = r->headers_in.x_forwarded_for; + xfwd = &r->headers_in.x_forwarded_for; - if (xfwd != NULL && ctx->proxies != NULL) { - (void) ngx_http_get_forwarded_addr(r, addr, xfwd->value.data, - xfwd->value.len, ctx->proxies, - ctx->proxy_recursive); + if (xfwd->nelts > 0 && ctx->proxies != NULL) { + (void) ngx_http_get_forwarded_addr(r, addr, xfwd, NULL, + ctx->proxies, ctx->proxy_recursive); } return NGX_OK; @@ -431,14 +430,14 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) return NGX_CONF_ERROR; } - pool = ngx_create_pool(16384, cf->log); + pool = ngx_create_pool(NGX_DEFAULT_POOL_SIZE, cf->log); if (pool == NULL) { return NGX_CONF_ERROR; } ngx_memzero(&ctx, sizeof(ngx_http_geo_conf_ctx_t)); - ctx.temp_pool = ngx_create_pool(16384, cf->log); + ctx.temp_pool = ngx_create_pool(NGX_DEFAULT_POOL_SIZE, cf->log); if (ctx.temp_pool == NULL) { return NGX_CONF_ERROR; } |
