changeset 2447:3d868fc44879

fix range start for ranges those spread in two or more slots
author Igor Sysoev <igor@sysoev.ru>
date Fri, 16 Jan 2009 15:44:39 +0000
parents 6fd7d9c3218d
children bbec98632208
files src/http/modules/ngx_http_geo_module.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_geo_module.c
+++ b/src/http/modules/ngx_http_geo_module.c
@@ -521,7 +521,12 @@ ngx_http_geo_add_range(ngx_conf_t *cf, n
     for (n = start; n < end; n += 0x10000) {
 
         h = n >> 16;
-        s = n & 0xffff;
+
+        if (n == start) {
+            s = n & 0xffff;
+        } else {
+            s = 0;
+        }
 
         if ((n | 0xffff) > end) {
             e = end & 0xffff;