aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_upstream.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-11-29 20:48:01 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-11-29 20:48:01 +0000
commit601ab90cd45030f28ac479ef4fd3ae761dcfb88c (patch)
treebd5756817a4044d6d6313593a10b518717ea9b15 /src/http/ngx_http_upstream.c
parenta1b92a96598ff9d54cdf5805c3e74ee266d349a4 (diff)
downloadnginx-601ab90cd45030f28ac479ef4fd3ae761dcfb88c.tar.gz
nginx-601ab90cd45030f28ac479ef4fd3ae761dcfb88c.zip
fix handling cached HTTP/0.9 response
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r--src/http/ngx_http_upstream.c5
1 files changed, 5 insertions, 0 deletions
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;