Varnish computes Content-Length and set it to 0 for one of my URL!

zabrane Mikael zabrane3 at gmail.com
Mon Jul 12 12:55:54 CEST 2010


Hi list,

I'm facing a little problem with my actual varnish config.
Currently, Varnish have only one backend (it's a caching server).

When trying to get a specific URL from the cache through Varnish, it always
set the header "Content-Length: 0" for it before sending it back to Firefox.

Inside the cache, this URL has no "Content-Length" header as you can see:

1) CACHE BACKEND ---> VARNISH
-----------------------------------------------------
HTTP/1.1 200 OK
Date: Tue, 15 Jun 2010 09:18:29 GMT
Content-Type: text/html; charset=UTF-8
X-Powered-By: ASP.NET
Set-Cookie: jsessionid=XXXXXXXXXXXXXXXXXXX; path=/

[payload]


2) VARNISH ----> FIREFOX
-----------------------------------------
Content-Type text/html; charset=UTF-8
X-Powered-By ASP.NET
Set-Cookie jsessionid=XXXXXXXXXXXXXXXXXXX; path=/
Content-Length 0
Date Mon, 12 Jul 2010 10:11:06 GMT
X-Varnish 353742751
Age 0
Via 1.1 varnish

[payload]


How can I tell "Varnish" to always compute the "Content-Length" if it's not
specified (in the headers response from the cache)?

Help appreciated guys!!!

N.B: getting this URL directly from the cache (i.e without using Varnish)
works perfectly.

-- 
Regards
Zab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100712/2776f3f4/attachment-0003.html>


More information about the varnish-misc mailing list