[Varnish] #1761: 204 responses intermittently delivered as chunk-encoded with length byte = 0
Varnish
varnish-bugs at varnish-cache.org
Fri Aug 7 18:08:16 CEST 2015
#1761: 204 responses intermittently delivered as chunk-encoded with length byte =
0
----------------------+----------------------------------------
Reporter: geoff | Owner: Poul-Henning Kamp <phk@…>
Type: defect | Status: closed
Priority: normal | Milestone: Varnish 4.0 release
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution: fixed
Keywords: |
----------------------+----------------------------------------
Comment (by geoff):
I'm afraid I can't test this patch. Our problem is in 4.0.3, whereas the
patch applies to master as of July 26th, and the differences are too large
for me to get a successful backport out of the merge conflicts.
The patch is also much more comprehensive than just fixing the problem
with the 204 response -- it covers a number of different cases concerning
delivery, as well as the fetch error regarding backend responses.
So I'd like to attempt a simpler patch for 4.0.3 to address the problem
with 204 responses.
If I'm reading the patch correctly, the essential step for that is in
delivery: if resp.status == 204, set the wantbody flag (req->wantbody in
4.0.3) to false and remove the Content-Length header.
When the wantbody flag is false, then neither ESI_Deliver() nor any VDP is
called, and "Transfer-Encoding: chunked" is not generated. So no response
body is delivered, nor any response headers that would require a body to
be present.
Would that suffice, or am I missing something?
I also see `if (wantbody == 0) return;` in ESI delivery; is that necessary
as well? If the wantbody flag is false, then it seems to me that delivery
would never get to ESI delivery in the first place.
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1761#comment:2>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list