diff src/http/ngx_http_upstream.c @ 3369:479468a7d982

fix handling cached HTTP/0.9 response
author Igor Sysoev <igor@sysoev.ru>
date Sun, 29 Nov 2009 20:48:01 +0000
parents 98f49b2bcae8
children ac9c0380337d
line wrap: on
line diff
--- 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_re
     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;