Mercurial > hg > nginx
comparison src/http/modules/ngx_http_limit_req_module.c @ 5846:cda4fcb9294c
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.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Tue, 16 Sep 2014 21:12:51 +0400 |
parents | 5024d29354f1 |
children | ecbb99aa0e12 |
comparison
equal
deleted
inserted
replaced
5845:40b24cfef18b | 5846:cda4fcb9294c |
---|---|
459 | 459 |
460 node->key = hash; | 460 node->key = hash; |
461 | 461 |
462 lr = (ngx_http_limit_req_node_t *) &node->color; | 462 lr = (ngx_http_limit_req_node_t *) &node->color; |
463 | 463 |
464 lr->len = (u_char) len; | 464 lr->len = (u_short) len; |
465 lr->excess = 0; | 465 lr->excess = 0; |
466 | 466 |
467 ngx_memcpy(lr->data, data, len); | 467 ngx_memcpy(lr->data, data, len); |
468 | 468 |
469 ngx_rbtree_insert(&ctx->sh->rbtree, node); | 469 ngx_rbtree_insert(&ctx->sh->rbtree, node); |