comparison src/http/modules/ngx_http_geo_module.c @ 4855:f66d0a6d7fdd stable-1.2

Merge of r4817: 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 Mon, 24 Sep 2012 19:02:16 +0000
parents 47936d1c98e9
children f57154322e0e
comparison
equal deleted inserted replaced
4854:735a05a53dc5 4855:f66d0a6d7fdd
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 {