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.
This commit is contained in:
Valentin Bartenev 2014-09-16 21:12:51 +04:00
parent 681f74a9ba
commit a7798de9bd

View File

@ -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);