Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-re
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
uplex-varnish
libvmod-re
Commits
30e22878
Unverified
Commit
30e22878
authored
Sep 01, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Seems like we are prepared for UTF-8
Patch best viewed with -b
parent
c5e9ef53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
10 deletions
+24
-10
b01.vtc
src/tests/b01.vtc
+24
-10
No files found.
src/tests/b01.vtc
View file @
30e22878
...
...
@@ -6,23 +6,32 @@ server s1 {
} -start
varnish v1 -vcl+backend {
import blob;
import re from "${vmod_topbuild}/src/.libs/libvmod_re.so";
sub vcl_init {
new foobar = re.regex("foobar");
new foobar = re.regex("foobar");
new snafu = re.regex("snafu");
new bar = re.regex("bar");
new unicode = re.regex("(*UTF)Sm.rrebr.d");
}
sub vcl_recv {
if (foobar.match(req.url)) {
return(pass);
} else if (snafu.match(req.url)) {
return(pipe);
} else {
return(pass);
}
}
sub vcl_recv {
if (req.url ~ "%") {
set req.url = blob.transcode(decoding=URL,
encoded=req.url);
}
if (unicode.match(req.url)) {
return(synth(200, "Yummy"));
} else if (foobar.match(req.url)) {
return(pass);
} else if (snafu.match(req.url)) {
return(pipe);
} else {
return(pass);
}
}
sub vcl_backend_response {
if (bar.match(beresp.http.foo)) {
...
...
@@ -46,4 +55,9 @@ client c1 {
expect resp.status == "200"
expect resp.http.foo1 == "1"
expect resp.http.bar1 == "2"
txreq -url "/Sm%C3%B8rrebr%C3%B8d"
rxresp
expect resp.status == "200"
expect resp.reason == "Yummy"
} -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