Mercurial > hg > nginx-quic
comparison src/http/ngx_http_upstream.c @ 3439:3354dfba9da4 stable-0.7
merge r3137, r3198, r3199, r3353, r3370, r3371, r3398, r3399:
cache related fixes:
*) do not pass buf with empty cached response,
this fixes "zero size buf in output" alert
*) hide cacheable Set-Cookie and P3P FastCGI response headers
*) test comma separator in "Cache-Control"
*) a cache manager thread handle was overwritten by a cache loader thread
handle, this caused an exit delay, the bug had been introduced in r3248
*) fix handling cached HTTP/0.9 response
*) log proxied HTTP/0.9 responses status as "009"
*) fix the "If-None-Match" header name
*) fix a cached zero-length body case
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 01 Feb 2010 15:46:14 +0000 |
parents | 0189a8f4c7c3 |
children | d963fa32847e |
comparison
equal
deleted
inserted
replaced
3438:a0a131127626 | 3439:3354dfba9da4 |
---|---|
710 ngx_http_cache_t *c; | 710 ngx_http_cache_t *c; |
711 | 711 |
712 r->cached = 1; | 712 r->cached = 1; |
713 c = r->cache; | 713 c = r->cache; |
714 | 714 |
715 if (c->header_start == c->body_start) { | |
716 r->http_version = NGX_HTTP_VERSION_9; | |
717 return ngx_http_cache_send(r); | |
718 } | |
719 | |
715 /* TODO: cache stack */ | 720 /* TODO: cache stack */ |
716 | 721 |
717 u->buffer = *c->buf; | 722 u->buffer = *c->buf; |
718 u->buffer.pos += c->header_start; | 723 u->buffer.pos += c->header_start; |
719 | 724 |
3015 } | 3020 } |
3016 | 3021 |
3017 n = 0; | 3022 n = 0; |
3018 | 3023 |
3019 for (p += 8; p < last; p++) { | 3024 for (p += 8; p < last; p++) { |
3020 if (*p == ';' || *p == ' ') { | 3025 if (*p == ',' || *p == ';' || *p == ' ') { |
3021 break; | 3026 break; |
3022 } | 3027 } |
3023 | 3028 |
3024 if (*p >= '0' && *p <= '9') { | 3029 if (*p >= '0' && *p <= '9') { |
3025 n = n * 10 + *p - '0'; | 3030 n = n * 10 + *p - '0'; |