server_name "" support
diff --git a/src/core/ngx_hash.c b/src/core/ngx_hash.c
index d36b142..dd28e7c 100644
--- a/src/core/ngx_hash.c
+++ b/src/core/ngx_hash.c
@@ -220,6 +220,10 @@
         }
     }
 
+    if (len == 0) {
+        return NULL;
+    }
+
     if (hash->wc_head && hash->wc_head->hash.buckets) {
         value = ngx_hash_find_wc_head(hash->wc_head, name, len);