varnish removing Transfer-Encoding: chunked header

Matthew Boedicker matthewm at
Fri Sep 11 09:09:15 CEST 2015

I have a rails app which returns 200 with an empty body as a response to a
POST. It does not set a Content-Length header, but does set a
Transfer-Encoding chunked header.

Varnish is removing the Transfer-Encoding header so that the response has
neither chunked nor content-length. This invalid response is causing the
upstream load balancer to return bad gateway.

I am using varnish 4.0.2-1. VCL is nearly the default VCL.

Is this expected behavior or should I open a bug?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list