============================================================================
==================================
Your regex differs than mine.  One negligible difference and one that I'll
focus on.  The negligible difference being the anchors "^" and "$".
They aren't necessary.

For reference, my regex was:
regsub(req.http.cookie, ".*mycookie=([^;]+);.*",

                                         ^
                                         ^

The difference is that I'm looking for a value in my regex, and you don't
care if there is a value in yours.  '+' vs '*'.

Your regex matches:
mycookie=
mycookie=a
mycookie=abc
...

My regex _doesn't_ match:
mycookie=

If you want to hash on an empty cookie, then your regex is what you want.
Otherwise, perhaps mine is what you want.
============================================================================
=======================
Thanks - a lot - I will change my regex :)  I certainly don't want to hash
on empty cookie. 

Regards

Soumendu



_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to