From a7798de9bd8f1f4fd5bce6d77631073d472bed8a Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Tue, 16 Sep 2014 21:12:51 +0400 Subject: [PATCH] Limit req: don't truncate key value to 255 bytes. While the module allows to use values up to 65535 bytes as a key, that actually never worked properly. --- src/http/modules/ngx_http_limit_req_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/modules/ngx_http_limit_req_module.c b/src/http/modules/ngx_http_limit_req_module.c index 74f7fdaa7..27d7b3092 100644 --- a/src/http/modules/ngx_http_limit_req_module.c +++ b/src/http/modules/ngx_http_limit_req_module.c @@ -461,7 +461,7 @@ ngx_http_limit_req_lookup(ngx_http_limit_req_limit_t *limit, ngx_uint_t hash, lr = (ngx_http_limit_req_node_t *) &node->color; - lr->len = (u_char) len; + lr->len = (u_short) len; lr->excess = 0; ngx_memcpy(lr->data, data, len);