Mailing List Archive

pass vs pipe
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi !

Doing some installations of varnish with plone instances we had some
problems:

We are using a vcl from from plone.recipe.varnish that has this part :


...

sub vcl_recv {

if (req.request == "PURGE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
lookup;
}

if (req.request != "GET" && req.request != "HEAD") {
# Do not try to cache POST
pass;
}

if (req.http.Expect) {
pipe;
}
...

VARNISH VERSION I USE: branch/1.1

the problem is on the not GET/HEAD rule :

if we choose pass some people get error on POST commits ( don't respond )

if we choose pipe some people get error ( it's my case ) that it takes
a long time and finally
it gave an error complaining about upstream. In my case I can't
access directly to the backend
as it's filtered by a firewall, maybe a reason ?

On my last tests I've just updated the 1.1 branch of varnish and now
pipe seems to work and pass don't.
Does anybody know what happens ?

Thanks !

Ramon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGyWfck3vgE06ET70RAmHyAJ94LyiTGKKDaPjkVYzWbmAScnlaRwCfRxTS
Rpgzxz1KjxqF0VSVP706gXI=
=zJSn
-----END PGP SIGNATURE-----
pass vs pipe [ In reply to ]
Ramon Navarro Bosch <ramon at epsem.upc.edu> writes:
> if (req.request != "GET" && req.request != "HEAD") {
> # Do not try to cache POST
> pass;
> }

This is wrong, pass mode can't handle POST requests (yet).

> VARNISH VERSION I USE: branch/1.1

From when?

> the problem is on the not GET/HEAD rule :
>
> if we choose pass some people get error on POST commits ( don't respond )
>
> if we choose pipe some people get error ( it's my case ) that it
> takes a long time and finally it gave an error complaining about
> upstream.

If this happens with the latest from branches/1.1, Try applying the
patch from r1888.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no