- 04 Feb, 2025 2 commits
-
-
Nils Goroll authored
gcc 13 complains that we used a pointer from before a realloc call, but it did not understand that we actually used it to calculate an offset only. Refactor the code to avoid this ambiguity. Ref #7 See https://gitlab.com/uplex/varnish/libvmod-re/-/issues/7#note_2328380883
-
Nils Goroll authored
-
- 31 Jan, 2025 8 commits
-
-
Nils Goroll authored
Fixes #6
-
Nils Goroll authored
For these, we can actually see a partial match with neither a string in the buffer nor in the current pointer, so realloc() was called with a zero size, in which case it can return NULL. Fixes #7
-
Nils Goroll authored
-
Nils Goroll authored
-
Nils Goroll authored
to get stricter linting
-
Nils Goroll authored
-
Nils Goroll authored
-
Nils Goroll authored
-
- 19 Dec, 2024 1 commit
-
-
Nils Goroll authored
it could return "true" for errors (which are negative, internally)
-
- 01 Oct, 2024 1 commit
-
-
Nils Goroll authored
-
- 05 Nov, 2023 3 commits
-
-
Nils Goroll authored
I wonder who has written the vmod.rst documentation clearly pointing out that this needs to be done... :| Ref Varnish-Cache ff18a3c5bf7cf02acaa5bc5672cc90c8bb805336
-
Nils Goroll authored
When we have a partial match and no buffer, we copy all of ptr/len and thus must not touch the startoffset. We could also copy from startoffset, but that could break lookbehinds, so don't.
-
Nils Goroll authored
-
- 01 Sep, 2023 1 commit
-
-
Nils Goroll authored
Patch best viewed with -b
-
- 20 Jul, 2023 11 commits
-
-
Nils Goroll authored
-
Nils Goroll authored
We can now iterate over bodies, calling a subroutine for each match.
-
Nils Goroll authored
Previously, we would only look for the first ever match. To support multiple matches, we now save the start offset relative to the ptr argument for the next invocation.
-
Nils Goroll authored
... or the highest match
-
Nils Goroll authored
-
Nils Goroll authored
-
Nils Goroll authored
-
Nils Goroll authored
-
Nils Goroll authored
-
Nils Goroll authored
The main reason is an upcoming improvement which needs workspace. But also using workspace here probably does not come with too relevant an advantage, because regular expression matching and copying are already expensive, and the need to copy should be the exception.
-
Nils Goroll authored
This is in preparation of an upcoming refactor to heap space.
-
- 19 Jul, 2023 2 commits
-
-
Nils Goroll authored
-
Nils Goroll authored
-
- 07 Jun, 2023 1 commit
-
-
Nils Goroll authored
-
- 05 Jun, 2023 1 commit
-
-
Nils Goroll authored
-
- 01 Jun, 2023 1 commit
-
-
Geoff Simmons authored
Add filters: regex objects to perform substitutions on bodies See merge request !3
-
- 29 May, 2023 2 commits
-
-
Nils Goroll authored
-
Nils Goroll authored
If the optional ``asfilter`` parameter to ``re.regex()`` is true, the vmod registers itself as a Varnish Fetch Processor (VFP) for use in `beresp.filters` and as a Varnish Delivery Processor (VDP) for use in `resp.filters`. In this setup, the `xregex.substitute_match()` and `xregex.substitute_all()` methods can be used to define replacements for matches on the body. Example: sub vcl_init { new reiher = re.regex("r(ei)h(er)", asfilter = true); } sub vcl_deliver { unset req.http.Accept-Encoding; set resp.filters += " reiher"; reiher.substitute_match(1, "czapla"); reiher.substitute_match(2, "\1\2"); reiher.substitute_match(0, "heron"); }
-
- 28 May, 2023 3 commits
-
-
Nils Goroll authored
-
Nils Goroll authored
-
Nils Goroll authored
-
- 02 May, 2023 2 commits
-
-
Nils Goroll authored
-
Nils Goroll authored
Ref varnish-cache 478e310a7d2c168e1c361d6f34291177cbc2a889
-
- 05 Apr, 2023 1 commit
-
-
Nils Goroll authored
-