From f4fde2d6247463621b3181396e7b14897f1be903 Mon Sep 17 00:00:00 2001
From: ijammy <[email protected]>
Date: Tue, 29 Jan 2013 12:31:08 +0800
Subject: [PATCH] when streaming enabled, if we need gzip or ungzip, won't set
 content-length

---
 bin/varnishd/cache_response.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/varnishd/cache_response.c b/bin/varnishd/cache_response.c
index f22d48a..a16b6df 100644
--- a/bin/varnishd/cache_response.c
+++ b/bin/varnishd/cache_response.c
@@ -351,7 +351,7 @@ RES_StreamStart(struct sess *sp)
        if (sp->wrk->res_mode & RES_GUNZIP)
                http_Unset(sp->wrk->resp, H_Content_Encoding);
 
-       if (!(sp->wrk->res_mode & RES_CHUNKED) &&
+       if ((sp->wrk->res_mode & RES_LEN) &&
            sp->wrk->h_content_length != NULL)
                http_PrintfHeader(sp->wrk, sp->fd, sp->wrk->resp,
                    "Content-Length: %s", sp->wrk->h_content_length);
-- 
1.7.10.2 (Apple Git-33)



Attachment: 0001-when-streaming-enabled-if-we-need-gzip-or-ungzip-won.patch
Description: Binary data

----------------------------------
Best wishes,
Jammy






_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to