From f8fdbcaaa256a061d1561691e0bdec203fce259f Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 16 Jan 2009 15:44:39 +0000 Subject: [PATCH] fix range start for ranges those spread in two or more slots --- src/http/modules/ngx_http_geo_module.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c index 310317ac6..2ada4c85d 100644 --- 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, ngx_http_geo_conf_ctx_t *ctx, 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;