Hello,<br /><br /><br />Using Varnish 4, I have a set of backends that're responding with a valid Content-Length header and no Transfer-Encoding header. On the first hit from a client, rather than responding to the client with those headers, Varnish is dropping the Content-Length header and adding Transfer-Encoding: chunked to the response. This is especially happening for fonts. The same data when fetched from apache and nginx works like a charm and continue to be problematic when used varnish in front. <br /><br />I've tried a number of semi-obvious things like below but all in vain:<br /><br />beresp.do_stream = true<br />beresp.do_gzip = false<br />unset req.http.Accept-Encoding<br /><br /><br />Sample varnishlog <backend> for your reference. <br /><br /><br /><br />*   << BeReq    >> 247282680<br />-   Begin          bereq 247282679 fetch<br />-   Timestamp      Start: 1430979942.850688 0.000000 0.000000<br />-   BereqMethod    GET<br />-   BereqURL       /ajaxprism/js_jq_1_0/css/fonts/roboto-regular-webfont.woff<br />-   BereqProtocol  HTTP/1.1<br />-   BereqHeader    Accept: application/font-woff;q=0.9,*/*;q=0.8<br />-   BereqHeader    Accept-Language: en-US,en;q=0.5<br />-   BereqHeader    Origin: http://xxx.domain.com<br />-   BereqHeader    Pragma: no-cache<br />-   BereqHeader    Referer: http://xxx.domain.com/ajaxprism/js_jq_1_0/css/style_2.css<br />-   BereqHeader    User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:37.0) Gecko/20100101 Firefox/37.0<br />-   BereqHeader    X-Forwarded-For: ::1<br />-   BereqHeader    host: xxx.domain.com<br />-   BereqHeader    Accept-Encoding: gzip<br />-   BereqHeader    X-Varnish: 247282680<br />-   VCL_call       BACKEND_FETCH<br />-   VCL_return     fetch<br />-   BackendClose   24 jdelivery(xxx.xxx.xxx.xxx,,80) toolate<br />-   BackendOpen    24 jdelivery(xxx.xxx.xxx.xxx,,80) xxx.xxx.xxx.xxx 35680<br />-   Backend        24 jdelivery jdelivery(xxx.xxx.xxx.xxx,,80)<br />-   Timestamp      Bereq: 1430979942.852142 0.001454 0.001454<br />-   Timestamp      Beresp: 1430979942.855756 0.005068 0.003614<br />-   BerespProtocol HTTP/1.1<br />-   BerespStatus   200<br />-   BerespReason   OK<br />-   BerespHeader   Date: Thu, 07 May 2015 06:25:43 GMT<br />-   BerespHeader   Server: Apache<br />-   BerespHeader   P3P: CP="ALL DSP COR LAW CUR DEVi TAI PSAi PSD IVA IVD CONo HIS TELo OUR DEL SAM BUS LOC" policyref="http://xxx.domain.com/w3c/p3p.xml"<br />-   BerespHeader   Last-Modified: Wed, 06 May 2015 06:54:03 GMT<br />-   BerespHeader   Accept-Ranges: bytes<br />-   BerespHeader   Content-Length: 25008<br />-   BerespHeader   Content-Type: application/font-woff<br />-   TTL            RFC 120 -1 -1 1430979943 1430979943 1430979943 0 0<br />-   VCL_call       BACKEND_RESPONSE<br />-   TTL            VCL 120 604800 0 1430979943<br />-   VCL_return     deliver<br />-   Storage        file s0<br />-   ObjProtocol    HTTP/1.1<br />-   ObjStatus      200<br />-   ObjReason      OK<br />-   ObjHeader      Date: Thu, 07 May 2015 06:25:43 GMT<br />-   ObjHeader      Server: Apache<br />-   ObjHeader      P3P: CP="ALL DSP COR LAW CUR DEVi TAI PSAi PSD IVA IVD CONo HIS TELo OUR DEL SAM BUS LOC" policyref="http://xxx.domain.com/w3c/p3p.xml"<br />-   ObjHeader      Last-Modified: Wed, 06 May 2015 06:54:03 GMT<br />-   ObjHeader      Content-Type: application/font-woff<br />-   Fetch_Body     3 length stream<br />-   BackendReuse   24 jdelivery(xxx.xxx.xxx.xxx,,80)<br />-   Timestamp      BerespBody: 1430979942.859386 0.008698 0.003630<br />-   Length         25008<br />-   BereqAcct      449 0 449 337 25008 25345<br />-   End<br /><br /><br />Regards,<br />Anand