summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2012-08-16 13:01:41 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2012-08-16 13:01:41 +0000
commit5425263436c761bf310d1ccb3dd756740c0ff69d (patch)
tree3ce5356d7f21411edec3d518c5eb2095f227e931
parent89bd5f038a570694763fd968ab471a91139b2f7f (diff)
downloadnginx-5425263436c761bf310d1ccb3dd756740c0ff69d.tar.gz
nginx-5425263436c761bf310d1ccb3dd756740c0ff69d.tar.bz2
Geo: fixed handling of ranges without default set.
The bug had appeared in 0.8.43 (r3653). Patch by Weibin Yao.
Diffstat (limited to '')
-rw-r--r--src/http/modules/ngx_http_geo_module.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c
index 189d8ed50..230816247 100644
--- a/src/http/modules/ngx_http_geo_module.c
+++ b/src/http/modules/ngx_http_geo_module.c
@@ -400,15 +400,15 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
}
}
+ if (ctx.high.default_value == NULL) {
+ ctx.high.default_value = &ngx_http_variable_null_value;
+ }
+
geo->u.high = ctx.high;
var->get_handler = ngx_http_geo_range_variable;
var->data = (uintptr_t) geo;
- if (ctx.high.default_value == NULL) {
- ctx.high.default_value = &ngx_http_variable_null_value;
- }
-
ngx_destroy_pool(ctx.temp_pool);
ngx_destroy_pool(pool);