aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_map_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-09-12 09:28:37 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-09-12 09:28:37 +0000
commit96e36ef25243d7f49d821dbf8e47937ddbdea3f6 (patch)
treeb4c9331ac7383ed25bee7adb01269e5b7717a31e /src/http/modules/ngx_http_map_module.c
parente0f1d0afcce898cbf2a40a7bad36e7faaa904702 (diff)
downloadnginx-96e36ef25243d7f49d821dbf8e47937ddbdea3f6.tar.gz
nginx-96e36ef25243d7f49d821dbf8e47937ddbdea3f6.zip
If .domain.com, .sub.domain.com, and .domain-some.com were defined,
then .sub.domain.com was matched by .domain.com: wildcard names hash was built incorrectly due to sorting order issue of "." vs "-". They were sorted as com.domain com.domain-some com.domain.sub while they should be sorted as com.domain com.domain.sub com.domain-some for correct hash building
Diffstat (limited to 'src/http/modules/ngx_http_map_module.c')
-rw-r--r--src/http/modules/ngx_http_map_module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_map_module.c b/src/http/modules/ngx_http_map_module.c
index 1f7786c3c..abdae0d3b 100644
--- a/src/http/modules/ngx_http_map_module.c
+++ b/src/http/modules/ngx_http_map_module.c
@@ -337,7 +337,7 @@ ngx_http_map_cmp_dns_wildcards(const void *one, const void *two)
first = (ngx_hash_key_t *) one;
second = (ngx_hash_key_t *) two;
- return ngx_strcmp(first->key.data, second->key.data);
+ return ngx_dns_strcmp(first->key.data, second->key.data);
}