Hi Dridi,

Thanks for confirming that! However, is there then a way to get the effect of 
being able to pass a regex to keep_re() and filter_re()? I just started working 
with the cookie vmod this morning and this would be a useful feature. As I 
understand it, Varnish 6.4 (we're on 6.5) replaced filter() and filter_except() 
with keep() and keep_re() and that the previous functions could take CSV 
strings.

Thanks,
Justin

________________________________
From: Dridi Boukelmoune <[email protected]>
Sent: Tuesday, April 6, 2021 10:29 AM
To: Justin Lloyd <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Cookie VMOD keep/filter documentation issue

On Tue, Apr 6, 2021 at 4:11 PM Justin Lloyd <[email protected]> wrote:
>
> Hi all,
>
> I'm confused on whether cookie.keep_re and cookie.filter_re should work with 
> CSV strings. The documentation at 
> https://varnish-cache.org/docs/trunk/reference/vmod_cookie.html does not 
> explicitly say that those two functions can take a CSV string like the docs 
> for keep and filter do, but the example for keep_re uses such string, 
> indicating that it should be able to. However, testing with varnishtest 
> definitely shows that the _re functions do not work with CSV strings. Can 
> anyone clarify what the truth is supposed to be?

Hi,

Looking at the examples right now it is clear [1] that filter() and
keep() each take a CSV string. It is also clear [1] that filter_re()
takes a single regular expression [2]. However, the keep_re()
example is both misleading and wrong.

Thanks for bringing this to our attention!

https://github.com/varnishcache/varnish-cache/commit/606977bbfb624ead38e9c8648beac0b3906a4294

Dridi

[1] to me
[2] not to be confused with a singular expression
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to