Varnish5 builtin VCL without pipe

Federico Schwindt fgsch at lodoss.net
Wed Apr 6 14:34:03 CEST 2016


For the record, added my comment to the VIP at
https://github.com/varnishcache/varnish-cache/wiki/VIP8:-No-pipe-in-builtin.vcl-in-V5
.


On Wed, Apr 6, 2016 at 9:27 AM, Poul-Henning Kamp <phk at phk.freebsd.dk>
wrote:

> Can we make builtin::vcl_recv{} look like this in Varnish5 ?
>
> sub vcl_recv {
>     if (req.method == "PRI" ||          /* HTTP/2.0 */
>       req.method == "CONNECT" ||
>       req.method == "OPTIONS" ||
>       req.method == "TRACE") {
>         return (synth(405));
>     }
>     if (req.method != "GET" && req.method != "HEAD") {
>         /* We only deal with GET and HEAD by default */
>         return (pass);
>     }
>     if (req.http.Authorization || req.http.Cookie) {
>         /* Not cacheable by default */
>         return (pass);
>     }
>     return (hash);
> }
>
> --
> 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.
>
> _______________________________________________
> varnish-dev mailing list
> varnish-dev at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20160406/0d53bbe2/attachment.html>


More information about the varnish-dev mailing list