Hello,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. I've tried a number of semi-obvious things 
like below but all in vain:beresp.do_stream = trueberesp.do_gzip = falseunset 
req.http.Accept-EncodingSample varnishlog <backend> for your 
reference. *   << BeReq    >> 247282680-   
Begin          bereq 247282679 fetch-   Timestamp 
     Start: 1430979942.850688 0.000000 0.000000-   
BereqMethod    GET-   BereqURL       /ajaxpr
 ism/js_jq_1_0/css/fonts/roboto-regular-webfont.woff-   BereqProtocol 
 HTTP/1.1-   BereqHeader    Accept: 
application/font-woff;q=0.9,*/*;q=0.8-   BereqHeader   
 Accept-Language: en-US,en;q=0.5-   BereqHeader    Origin: 
http://xxx.domain.com-   BereqHeader    Pragma: no-cache-   
BereqHeader    Referer: 
http://xxx.domain.com/ajaxprism/js_jq_1_0/css/style_2.css-   BereqHeader 
   User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:37.0) Gecko/20100101 
Firefox/37.0-   BereqHeader    X-Forwarded-For: ::1-   
BereqHeader    host: xxx.domain.com-   BereqHeader   
 Accept-Encoding: gzip-   BereqHeader    X-Varnish: 
247282680-   VCL_call       BACKEND_FETCH-   
VCL_return     fetch-   BackendClose   24 
jdelivery(xxx.xxx.xxx.xxx,,80) toolate-   BackendOpen    24 
jdelivery(xxx.xxx.xxx.xxx,
 ,80) xxx.xxx.xxx.xxx 35680-   Backend        24 
jdelivery jdelivery(xxx.xxx.xxx.xxx,,80)-   Timestamp     
 Bereq: 1430979942.852142 0.001454 0.001454-   Timestamp   
   Beresp: 1430979942.855756 0.005068 0.003614-   BerespProtocol 
HTTP/1.1-   BerespStatus   200-   BerespReason   OK-   
BerespHeader   Date: Thu, 07 May 2015 06:25:43 GMT-   BerespHeader 
  Server: Apache-   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"-   BerespHeader 
  Last-Modified: Wed, 06 May 2015 06:54:03 GMT-   BerespHeader   
Accept-Ranges: bytes-   BerespHeader   Content-Length: 25008-   
BerespHeader   Content-Type: application/font-woff-   TTL   
         RFC 120 -1 -1 1430979943 1430979943 143097994
 3 0 0-   VCL_call       BACKEND_RESPONSE-   TTL 
           VCL 120 604800 0 1430979943-   
VCL_return     deliver-   Storage       
 file s0-   ObjProtocol    HTTP/1.1-   ObjStatus 
     200-   ObjReason      OK-   
ObjHeader      Date: Thu, 07 May 2015 06:25:43 GMT-   
ObjHeader      Server: Apache-   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"-   ObjHeader 
     Last-Modified: Wed, 06 May 2015 06:54:03 GMT-   
ObjHeader      Content-Type: application/font-woff-   
Fetch_Body     3 length stream-   BackendReuse   24 
jdelivery(xxx.xxx.xxx.xxx,,80)-   Timestamp      BerespBody:
  1430979942.859386 0.008698 0.003630-   Length       
  25008-   BereqAcct      449 0 449 337 25008 25345- 
  EndRegards,Anand
_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to