diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-09-12 09:28:37 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-09-12 09:28:37 +0000 |
commit | 96e36ef25243d7f49d821dbf8e47937ddbdea3f6 (patch) | |
tree | b4c9331ac7383ed25bee7adb01269e5b7717a31e /src/http/ngx_http.c | |
parent | e0f1d0afcce898cbf2a40a7bad36e7faaa904702 (diff) | |
download | nginx-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/ngx_http.c')
-rw-r--r-- | src/http/ngx_http.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index b0915157c..f5cb430fa 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -1601,7 +1601,7 @@ ngx_http_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); } |