Hi list,<div><br></div><div><div>I'm facing a little problem with my actual varnish config.</div><div>Currently, Varnish have only one backend (it's a caching server).</div><div><br></div><div>When trying to get a specific URL from the cache through Varnish, it always</div>
<div>set the header "Content-Length: 0" for it before sending it back to Firefox.</div><div><br></div><div>Inside the cache, this URL has no "Content-Length" header as you can see:</div><div><br></div>
<div>1) CACHE BACKEND ---> VARNISH</div><div>-----------------------------------------------------</div><div>HTTP/1.1 200 OK</div><div>Date: Tue, 15 Jun 2010 09:18:29 GMT</div><div>Content-Type: text/html; charset=UTF-8</div>
<div>X-Powered-By: <a href="http://ASP.NET">ASP.NET</a></div><div>Set-Cookie: jsessionid=XXXXXXXXXXXXXXXXXXX; path=/</div><div><br></div><div>[payload]</div><div><br></div><div><br></div><div>2) VARNISH ----> FIREFOX</div>
<div>-----------------------------------------</div><div><div>Content-Type<span class="Apple-tab-span" style="white-space:pre">        </span>text/html; charset=UTF-8</div><div>X-Powered-By<span class="Apple-tab-span" style="white-space:pre">        </span><a href="http://ASP.NET">ASP.NET</a></div>
<div>Set-Cookie<span class="Apple-tab-span" style="white-space:pre">        </span>jsessionid=XXXXXXXXXXXXXXXXXXX; path=/</div><div>Content-Length<span class="Apple-tab-span" style="white-space:pre">        </span>0</div><div>Date<span class="Apple-tab-span" style="white-space:pre">        </span>Mon, 12 Jul 2010 10:11:06 GMT</div>
<div>X-Varnish<span class="Apple-tab-span" style="white-space:pre">        </span>353742751</div><div>Age<span class="Apple-tab-span" style="white-space:pre">        </span>0</div><div>Via<span class="Apple-tab-span" style="white-space:pre">        </span>1.1 varnish</div>
</div><div><br></div><div>[payload]</div><div><br></div><div><br></div><div>How can I tell "Varnish" to always compute the "Content-Length" if it's not specified (in the headers response from the cache)?</div>
<div><br></div>Help appreciated guys!!!</div><div><br></div><div>N.B: getting this URL directly from the cache (i.e without using Varnish) works perfectly.</div><div><br>-- <br>Regards<br>Zab<br>
</div>