Cookie VMOD keep/filter documentation issue

Dridi Boukelmoune dridi at varni.sh
Tue Apr 6 17:29:23 UTC 2021


On Tue, Apr 6, 2021 at 4:11 PM Justin Lloyd <justinl at arena.net> 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


More information about the varnish-misc mailing list