diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2012-09-24 19:02:16 +0000 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2012-09-24 19:02:16 +0000 |
| commit | 892410148fb5ed8926723306d1af7238327a2101 (patch) | |
| tree | ee97f7db84f8f2f6a5169dd52231a53b21447b7e | |
| parent | 2953f4aa399922cf865dbab6b0213a074784c90b (diff) | |
| download | nginx-892410148fb5ed8926723306d1af7238327a2101.tar.gz nginx-892410148fb5ed8926723306d1af7238327a2101.tar.bz2 | |
Merge of r4817: geo: fixed handling of ranges without default set.
The bug had appeared in 0.8.43 (r3653). Patch by Weibin Yao.
| -rw-r--r-- | src/http/modules/ngx_http_geo_module.c | 8 |
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); |
