comparison src/http/modules/ngx_http_geo_module.c @ 4816:2ccaaf838bc2

Geo: fixed handling of ranges without default set. The bug had appeared in 0.8.43 (r3653). Patch by Weibin Yao.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 16 Aug 2012 13:01:41 +0000
parents bb37a9cc08fb
children f57154322e0e
comparison
equal deleted inserted replaced
4815:63dff7943fc7 4816:2ccaaf838bc2
398 { 398 {
399 ngx_http_geo_create_binary_base(&ctx); 399 ngx_http_geo_create_binary_base(&ctx);
400 } 400 }
401 } 401 }
402 402
403 if (ctx.high.default_value == NULL) {
404 ctx.high.default_value = &ngx_http_variable_null_value;
405 }
406
403 geo->u.high = ctx.high; 407 geo->u.high = ctx.high;
404 408
405 var->get_handler = ngx_http_geo_range_variable; 409 var->get_handler = ngx_http_geo_range_variable;
406 var->data = (uintptr_t) geo; 410 var->data = (uintptr_t) geo;
407
408 if (ctx.high.default_value == NULL) {
409 ctx.high.default_value = &ngx_http_variable_null_value;
410 }
411 411
412 ngx_destroy_pool(ctx.temp_pool); 412 ngx_destroy_pool(ctx.temp_pool);
413 ngx_destroy_pool(pool); 413 ngx_destroy_pool(pool);
414 414
415 } else { 415 } else {