unprocessed requests

Stig Sandbeck Mathisen ssm at linpro.no
Thu Apr 24 07:33:23 CEST 2008


On Thu, 24 Apr 2008 06:52:29 +0200, Stig Sandbeck Mathisen <ssm at linpro.no> said:

> If one request goes is directed to "pipe", and the connection is
> kept open, other requests will go through the same connection
> without being inspected touched by varnish.  This is especially
> visible after a login in zope (or plone), which is done via the POST
> method.

On further inspection of source and tickets, using "pipe" and
'req.http.connection = "close";' should be done for 1.1.2.  For 1.2,
which includes the "2115" changeset, you should be able to use "pass"
instead of "pipe" for POST, enabling connection reuse.

My relevant vcl for 1.2 :

sub vcl_recv {

  # Normalize Host: header to limit cache usage
  if (req.http.host ~ "^(www.)?fnord.no") {
    set req.http.host = "fnord.no";
    set req.backend   = zope_195;
    set req.url       = "/VirtualHostBase/http/fnord.no:80/Sites/fnord.no/VirtualHostRoot" req.url;
  } elsif (<another site>) {
    # [...]
  } else {
    error 404 "Unknown virtual host"
  }

  if (req.request == "POST") {
    pass;
  }

  if (req.request != "GET" && req.request != "HEAD") {
    # [...]
  }

  # [...]
}


A few short tests on one of my own sites shows it to not break
immediately, at least. :)

-- 
Stig Sandbeck Mathisen, Linpro



More information about the varnish-misc mailing list