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/perl/nginx.xs | |
| parent | 777b019c7338b6a67f639bb86b90711055709c53 (diff) | |
| download | nginx-6a07833d478a9b969dfa8a66041fc8537ee2b8d1.tar.gz nginx-6a07833d478a9b969dfa8a66041fc8537ee2b8d1.tar.bz2 | |
ngx_hash_strlow()
Diffstat (limited to '')
| -rw-r--r-- | src/http/modules/perl/nginx.xs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs index 6e7ad7760..fbc7f59be 100644 --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -247,11 +247,7 @@ header_in(r, key) XSRETURN_UNDEF; } - hash = 0; - for (i = 0; i < len; i++) { - lowcase_key[i] = ngx_tolower(p[i]); - hash = ngx_hash(hash, lowcase_key[i]); - } + hash = ngx_hash_strlow(lowcase_key, p, len); cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module); @@ -833,11 +829,7 @@ variable(r, name, value = NULL) XSRETURN_UNDEF; } - hash = 0; - for (i = 0; i < len; i++) { - lowcase[i] = ngx_tolower(p[i]); - hash = ngx_hash(hash, lowcase[i]); - } + hash = ngx_hash_strlow(lowcase, p, len); var.len = len; var.data = lowcase; |
