aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ngx_hash.c')
-rw-r--r--src/core/ngx_hash.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/ngx_hash.c b/src/core/ngx_hash.c
index 0a1d69d9b..1f677c9fa 100644
--- a/src/core/ngx_hash.c
+++ b/src/core/ngx_hash.c
@@ -753,7 +753,9 @@ ngx_hash_add_key(ngx_hash_keys_arrays_t *ha, ngx_str_t *key, void *value,
k = 0;
for (i = 0; i < key->len; i++) {
- key->data[i] = ngx_tolower(key->data[i]);
+ if (!(flags & NGX_HASH_READONLY_KEY)) {
+ key->data[i] = ngx_tolower(key->data[i]);
+ }
k = ngx_hash(k, key->data[i]);
}