Purging contents

Poul-Henning Kamp phk at phk.freebsd.dk
Thu Jan 22 08:35:55 CET 2009


In message <75cf5800901212121k6647747bg31877e8b1d51280b at mail.gmail.com>, Paras 
Fadte writes:

>should it have "else" so that it becomes
>
>sub vcl_recv {
>
>       if (req.request == "PURGE") {
>                if (!client.ip ~ purge) {
>                        error 405 "Not allowed.";
>                }
>
>else {
>                lookup;
>        }
>
>}

That is not necessary, "error" is a terminating action.

>Also when I telnet to varnish listen port (not the management port) it
>seems to close the connection after about 4-5 seconds automatically.
>what could be the issue ? Telnetting to management port works fines.

That is intentional, if clients don't send a request, we don't want
to waste resources on them.

The timeout is configurable with param sess_timeout.


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-misc mailing list