Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-pcre2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-pcre2
Commits
f0b07502
Commit
f0b07502
authored
Feb 23, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a test for compile option match_unset_backref
parent
60209e72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
compile_opts.vtc
src/tests/compile_opts.vtc
+28
-0
No files found.
src/tests/compile_opts.vtc
View file @
f0b07502
...
...
@@ -521,3 +521,31 @@ varnish v1 -errvcl {vmod pcre2 error: Cannot set locale lPb2PZDb4KcfbKJPSww1cm6o
new r = pcre2.regex("", locale="lPb2PZDb4KcfbKJPSww1cm6omvoF");
}
}
# match_unset_backref
varnish v1 -vcl {
import pcre2 from "${vmod_topbuild}/src/.libs/libvmod_pcre2.so";
backend b { .host = "${bad_ip}"; }
sub vcl_init {
new r1 = pcre2.regex("(\3)(\1)(a)", match_unset_backref=true);
new r2 = pcre2.regex("(\3)(\1)(a)");
}
sub vcl_recv {
return(synth(200));
}
sub vcl_synth {
set resp.http.r1 = r1.match("cat");
set resp.http.r2 = r2.match("cat");
}
}
client c1 {
txreq
rxresp
expect resp.status == "200"
expect resp.http.r1 == "true"
expect resp.http.r2 == "false"
} -run
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment