Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-re2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
Nils Goroll
libvmod-re2
Commits
be834827
Commit
be834827
authored
Mar 26, 2016
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test re-use of compiled set regexen
parent
ce15e3dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
cached.vtc
src/tests/cached.vtc
+10
-0
No files found.
src/tests/cached.vtc
View file @
be834827
...
...
@@ -10,6 +10,10 @@ varnish v1 -vcl+backend {
sub vcl_init {
new barbaz = re2.regex("(bar)(baz)");
new foobar = re2.set();
foobar.add("foo");
foobar.add("bar");
foobar.compile();
}
sub vcl_recv {
...
...
@@ -24,6 +28,11 @@ varnish v1 -vcl+backend {
} else {
set resp.status = 999;
}
if (foobar.match("foo")) {
set resp.http.foo3 = "match";
} else {
set resp.status = 999;
}
}
} -start
...
...
@@ -35,6 +44,7 @@ client c1 {
expect resp.http.foo0 == "barbaz"
expect resp.http.foo1 == "bar"
expect resp.http.foo2 == "baz"
expect resp.http.foo3 == "match"
}
client c1 -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