Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-frozen
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-frozen
Commits
b09ecc80
Unverified
Commit
b09ecc80
authored
Aug 26, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor vtc: extract to own sub
parent
4bb36728
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
vmod_frozen.vtc
src/vtc/vmod_frozen.vtc
+8
-5
No files found.
src/vtc/vmod_frozen.vtc
View file @
b09ecc80
...
...
@@ -28,11 +28,7 @@ varnish v1 -vcl+backend {
sub vcl_recv {
return (synth(200));
}
sub vcl_synth {
set resp.http.fail = p_test.parse(req.http.not);
set resp.http.parse =
p_test.parse({"{ a: 1, b: "hi there", c: true, d: false, "} +
{" e : null, f: [ 1, -2, 3], g: { "1": [], h: [ 7 ] } } "});
sub extract {
set resp.http.a = p_test.extract(".a");
set resp.http.a-type = p_test.type(".a");
...
...
@@ -68,6 +64,13 @@ varnish v1 -vcl+backend {
set resp.http.g = p_test.extract(".g");
set resp.http.g-type = p_test.type(".g");
}
sub vcl_synth {
set resp.http.fail = p_test.parse(req.http.not);
set resp.http.parse =
p_test.parse({"{ a: 1, b: "hi there", c: true, d: false, "} +
{" e : null, f: [ 1, -2, 3], g: { "1": [], h: [ 7 ] } } "});
call extract;
}
} -start
client c1 {
...
...
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