From 601ab90cd45030f28ac479ef4fd3ae761dcfb88c Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sun, 29 Nov 2009 20:48:01 +0000 Subject: fix handling cached HTTP/0.9 response --- src/http/ngx_http_upstream.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/http/ngx_http_upstream.c') diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index b82bfa97b..9f1a89753 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -752,6 +752,11 @@ ngx_http_upstream_cache_send(ngx_http_request_t *r, ngx_http_upstream_t *u) r->cached = 1; c = r->cache; + if (c->header_start == c->body_start) { + r->http_version = NGX_HTTP_VERSION_9; + return ngx_http_cache_send(r); + } + /* TODO: cache stack */ u->buffer = *c->buf; -- cgit