diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-08-04 10:18:36 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-08-04 10:18:36 +0000 |
commit | 6a07833d478a9b969dfa8a66041fc8537ee2b8d1 (patch) | |
tree | a0e474a1f7f37eb763e2c7fa27f0de89fbaa84d2 /src/http/modules/ngx_http_map_module.c | |
parent | 777b019c7338b6a67f639bb86b90711055709c53 (diff) | |
download | nginx-6a07833d478a9b969dfa8a66041fc8537ee2b8d1.tar.gz nginx-6a07833d478a9b969dfa8a66041fc8537ee2b8d1.zip |
ngx_hash_strlow()
Diffstat (limited to 'src/http/modules/ngx_http_map_module.c')
-rw-r--r-- | src/http/modules/ngx_http_map_module.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/http/modules/ngx_http_map_module.c b/src/http/modules/ngx_http_map_module.c index cedc50879..c2459f271 100644 --- a/src/http/modules/ngx_http_map_module.c +++ b/src/http/modules/ngx_http_map_module.c @@ -106,7 +106,7 @@ ngx_http_map_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, size_t len; u_char *name; - ngx_uint_t key, i; + ngx_uint_t key; ngx_http_variable_value_t *vv, *value; ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, @@ -135,11 +135,7 @@ ngx_http_map_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, return NGX_ERROR; } - key = 0; - for (i = 0; i < len; i++) { - name[i] = ngx_tolower(vv->data[i]); - key = ngx_hash(key, name[i]); - } + key = ngx_hash_strlow(name, vv->data, len); value = ngx_hash_find_combined(&map->hash, key, name, len); |