Hello,<br><br>I have a curious problem with Varnish 1.1.2 response headers on Ubuntu Gutsy.  I think it is best summarized with some telnet excerpts:<br><br>Telnet to backend server:<br><br>john@rush:~> telnet localhost 8080<br>
Trying 127.0.0.1...<br>Connected to localhost.<br>Escape character is '^]'.<br>GET /static/images/7/6/9/4257486967_large_processed.jpg HTTP/1.1<br><br>HTTP/1.1 200 <br>Content-type: image/jpeg<br>Content-Length: 8453<br>
Last-Modified: Sat, 23 Feb 2008 05:44:28 GMT<br>Date: Sat, 22 Mar 2008 23:03:30 GMT<br>Server: CherryPy/3.0.1<br><br><snipped binary data><br><br>Now when I try it through varnish I get the following messed up status header:<br>
<br>john@rush:~> telnet localhost 6081<br>Trying 127.0.0.1...<br>Connected to localhost.<br>Escape character is '^]'.<br>GET /static/images/7/6/9/4257486967_large_processed.jpg HTTP/1.1<br><br>HTTP/1.1 200 Content-type: image/jpeg<br>
Last-Modified: Sat, 23 Feb 2008 05:44:28 GMT<br>Server: CherryPy/3.0.1<br>Content-Length: 8453<br>Date: Sat, 22 Mar 2008 23:05:26 GMT<br>X-Varnish: 768656770<br>Age: 0<br>Via: 1.1 varnish<br>Connection: keep-alive<br><br>
<snipped binary data><br><br>You will see the issue in the HTTP/1.200 status line.  I've played with the configuration of the backend server application, and no matter what header is placed first, it is concatenated to the status line in Varnish's response.<br>
<br>The vcl.conf is very simple, pretty well just this: <br><br>sub vcl_recv {<br><br>    if (req.request == "GET" && req.url ~ "\.(png|gif|jpg|swf|css|js)$") {<br>        lookup;<br>    }<br><br>
    if (req.request == "GET" && req.http.cookie) {<br>        remove obj.http.Set-Cookie;<br>        lookup;<br>    }<br><br>    if (req.request == "POST") {<br>        pipe;<br>    }<br><br>    if (req.http.Accept-Encoding) {<br>
        if (req.url ~ "\.(jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg)$") {<br>           remove req.http.Accept-Encoding;<br>        } elsif (req.http.Accept-Encoding ~ "gzip") {<br>           set req.http.Accept-Encoding = "gzip";<br>
        } elsif (req.http.Accept-Encoding ~ "deflate") {<br>           set req.http.Accept-Encoding = "deflate";<br>        } else {<br>           remove req.http.Accept-Encoding;<br>        }<br>    }<br>
<br>    pass<br>}<br><br>I've looked at this a half-dozen ways and can't see what the problem is.  Any ideas?<br><br>John<br><br><br><br clear="all"><br>-- <br>John Jensen<br><a href="mailto:john@jensen.net">john@jensen.net</a>