]> git.kaiwu.me - nginx.git/commitdiff
test binary geo ranges base only for ranges
authorIgor Sysoev <igor@sysoev.ru>
Wed, 30 Jun 2010 10:05:56 +0000 (10:05 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 30 Jun 2010 10:05:56 +0000 (10:05 +0000)
src/http/modules/ngx_http_geo_module.c

index 5883a087c610a2c591774704a1fd6256dec51548..efa69b3a5ce1c7ef60d24aebd6f6b3c6a74c29dd 100644 (file)
@@ -1103,15 +1103,17 @@ ngx_http_geo_include(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
         return NGX_CONF_ERROR;
     }
 
-    ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data);
-
-    switch (ngx_http_geo_include_binary_base(cf, ctx, &file)) {
-    case NGX_OK:
-        return NGX_CONF_OK;
-    case NGX_ERROR:
-        return NGX_CONF_ERROR;
-    default:
-        break;
+    if (ctx->ranges) {
+       ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data);
+
+       switch (ngx_http_geo_include_binary_base(cf, ctx, &file)) {
+       case NGX_OK:
+           return NGX_CONF_OK;
+       case NGX_ERROR:
+           return NGX_CONF_ERROR;
+       default:
+           break;
+       }
     }
 
     file.len -= 4;