Hello,
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:
Telnet to backend server:
[EMAIL PROTECTED]:~> telnet localhost 8080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /static/images/7/6/9/4257486967_large_processed.jpg HTTP/1.1
HTTP/1.1 200
Content-type: image/jpeg
Content-Length: 8453
Last-Modified: Sat, 23 Feb 2008 05:44:28 GMT
Date: Sat, 22 Mar 2008 23:03:30 GMT
Server: CherryPy/3.0.1
<snipped binary data>
Now when I try it through varnish I get the following messed up status
header:
[EMAIL PROTECTED]:~> telnet localhost 6081
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /static/images/7/6/9/4257486967_large_processed.jpg HTTP/1.1
HTTP/1.1 200 Content-type: image/jpeg
Last-Modified: Sat, 23 Feb 2008 05:44:28 GMT
Server: CherryPy/3.0.1
Content-Length: 8453
Date: Sat, 22 Mar 2008 23:05:26 GMT
X-Varnish: 768656770
Age: 0
Via: 1.1 varnish
Connection: keep-alive
<snipped binary data>
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.
The vcl.conf is very simple, pretty well just this:
sub vcl_recv {
if (req.request == "GET" && req.url ~ "\.(png|gif|jpg|swf|css|js)$") {
lookup;
}
if (req.request == "GET" && req.http.cookie) {
remove obj.http.Set-Cookie;
lookup;
}
if (req.request == "POST") {
pipe;
}
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg)$") {
remove req.http.Accept-Encoding;
} elsif (req.http.Accept-Encoding ~ "gzip") {
set req.http.Accept-Encoding = "gzip";
} elsif (req.http.Accept-Encoding ~ "deflate") {
set req.http.Accept-Encoding = "deflate";
} else {
remove req.http.Accept-Encoding;
}
}
pass
}
I've looked at this a half-dozen ways and can't see what the problem is.
Any ideas?
John
--
John Jensen
[EMAIL PROTECTED]
_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc