[nginx] svn commit: r4817 - trunk/src/http/modules

mdounin at mdounin.ru mdounin at mdounin.ru
Thu Aug 16 13:01:42 UTC 2012


Author: mdounin
Date: 2012-08-16 13:01:41 +0000 (Thu, 16 Aug 2012)
New Revision: 4817
URL: http://trac.nginx.org/nginx/changeset/4817/nginx

Log:
Geo: fixed handling of ranges without default set.

The bug had appeared in 0.8.43 (r3653).  Patch by Weibin Yao.


Modified:
   trunk/src/http/modules/ngx_http_geo_module.c

Modified: trunk/src/http/modules/ngx_http_geo_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_geo_module.c	2012-08-16 12:05:58 UTC (rev 4816)
+++ trunk/src/http/modules/ngx_http_geo_module.c	2012-08-16 13:01:41 UTC (rev 4817)
@@ -400,15 +400,15 @@
             }
         }
 
+        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);
 



More information about the nginx-devel mailing list