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	Sun Nov 29 20:39:32 2009 +0000
+++ b/src/http/ngx_http_upstream.c	Sun Nov 29 20:48:01 2009 +0000
@@ -752,6 +752,11 @@
     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;