summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c4
-rw-r--r--src/http/modules/ngx_http_proxy_module.c5
-rw-r--r--src/http/modules/ngx_http_sub_filter_module.c7
3 files changed, 4 insertions, 12 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index b975c0675..e310bbb6e 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -1120,9 +1120,7 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r)
ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len);
} else {
- for (i = 0; i < h->key.len; i++) {
- h->lowcase_key[i] = ngx_tolower(h->key.data[i]);
- }
+ ngx_strlow(h->lowcase_key, h->key.data, h->key.len);
}
hh = ngx_hash_find(&umcf->headers_in_hash, h->hash,
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index 8a7f2ab9e..880d99840 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -1196,7 +1196,6 @@ static ngx_int_t
ngx_http_proxy_process_header(ngx_http_request_t *r)
{
ngx_int_t rc;
- ngx_uint_t i;
ngx_table_elt_t *h;
ngx_http_upstream_header_t *hh;
ngx_http_upstream_main_conf_t *umcf;
@@ -1237,9 +1236,7 @@ ngx_http_proxy_process_header(ngx_http_request_t *r)
ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len);
} else {
- for (i = 0; i < h->key.len; i++) {
- h->lowcase_key[i] = ngx_tolower(h->key.data[i]);
- }
+ ngx_strlow(h->lowcase_key, h->key.data, h->key.len);
}
hh = ngx_hash_find(&umcf->headers_in_hash, h->hash,
diff --git a/src/http/modules/ngx_http_sub_filter_module.c b/src/http/modules/ngx_http_sub_filter_module.c
index e45ca6e49..62a8f0814 100644
--- a/src/http/modules/ngx_http_sub_filter_module.c
+++ b/src/http/modules/ngx_http_sub_filter_module.c
@@ -632,7 +632,6 @@ ngx_http_sub_filter(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
ngx_str_t *value;
ngx_int_t n;
- ngx_uint_t i;
ngx_http_script_compile_t sc;
if (slcf->match.len) {
@@ -641,11 +640,9 @@ ngx_http_sub_filter(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
value = cf->args->elts;
- slcf->match = value[1];
+ ngx_strlow(value[1].data, value[1].data, value[1].len);
- for (i = 0; i < value[1].len; i++) {
- value[1].data[i] = ngx_tolower(value[1].data[i]);
- }
+ slcf->match = value[1];
n = ngx_http_script_variables_count(&value[2]);