comparison src/http/ngx_http_upstream.c @ 3948:7cccdc1809a2 stable-0.8

merge r3945: fix segfault if cache key is larger than upstream buffer size patch by Lanshun Zhou
author Igor Sysoev <igor@sysoev.ru>
date Tue, 19 Jul 2011 13:52:56 +0000
parents f0b62d1ac7af
children
comparison
equal deleted inserted replaced
3947:7890c9617eb5 3948:7cccdc1809a2
664 664
665 /* TODO: add keys */ 665 /* TODO: add keys */
666 666
667 ngx_http_file_cache_create_key(r); 667 ngx_http_file_cache_create_key(r);
668 668
669 if (r->cache->header_start >= u->conf->buffer_size) {
670 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
671 "cache key too large, increase upstream buffer size %uz",
672 u->conf->buffer_size);
673
674 r->cache = NULL;
675 return NGX_DECLINED;
676 }
677
669 u->cacheable = 1; 678 u->cacheable = 1;
670 679
671 c = r->cache; 680 c = r->cache;
672 681
673 c->min_uses = u->conf->cache_min_uses; 682 c->min_uses = u->conf->cache_min_uses;