summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_upstream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r--src/http/ngx_http_upstream.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 943ef69e8..2deec4819 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -712,6 +712,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;
@@ -3017,7 +3022,7 @@ ngx_http_upstream_process_cache_control(ngx_http_request_t *r,
n = 0;
for (p += 8; p < last; p++) {
- if (*p == ';' || *p == ' ') {
+ if (*p == ',' || *p == ';' || *p == ' ') {
break;
}