[Varnish] #624: backend_http11 fails to set HTTP version 1.1 properly
Varnish
varnish-bugs at projects.linpro.no
Mon Jan 25 16:01:52 CET 2010
#624: backend_http11 fails to set HTTP version 1.1 properly
----------------------+-----------------------------------------------------
Reporter: janne | Owner: kristian
Type: defect | Status: assigned
Priority: normal | Milestone: Varnish 2.1 release
Component: varnishd | Version:
Severity: normal | Resolution:
Keywords: |
----------------------+-----------------------------------------------------
Comment (by kristian):
Ok, after a hurdle of tinkering, I've discovered what's happening here.
It's a series of corner-cases comming together, so stick with it:
First of all, the backend_http11 option doesn't do anything in 2.0.6, and
has since been removed. Varnish will behave as if it's set to 'on'.
However, in the case of pass or pipe, varnish will use the protocol- and
request-field the client sent, so this is how Varnish suddenly sent
HTTP/1.0, even though you told it not to, and it doesn't do it by default.
Next is your backend: It replies with a HTTP/1.1 protocol header to a
HTTP/1.0 request - this itself is fairly common - but it seems to be in a
limbo between HTTP/1.0 and HTTP/1.1: It doesn't set "Connection: close",
but it is obviously not in keep-alive mode. Looking at nginx - which is
what I had available - it also replies with HTTP/1.1 to HTTP/1.0-requests,
but it sets "Connection: close".
There is some confusion in this code, so I'll continue to work on it, but
your backend is definitely not handling this right either. It is probably
best for Varnish to assume that a connection will be closed if it sends a
HTTP/1.0 request, but at the same time, it's not obvious....
Somewhat off-topic (I'm a curious guy): If you send a HTTP/1.1 request to
your backend without a Connection:-header, how does it respond? Does it do
keep-alive, or does it close? Does it supply a Connection: header?
--
Ticket URL: <http://varnish-cache.org/ticket/624#comment:2>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list