Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-file
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-file
Commits
42ee1d06
Commit
42ee1d06
authored
Sep 21, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Verify that the file may be a link, if it points to a regular file.
parent
1b12e9ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
get.vtc
src/tests/get.vtc
+33
-0
No files found.
src/tests/get.vtc
View file @
42ee1d06
...
...
@@ -29,6 +29,28 @@ client c1 {
expect resp.http.Get == "foo bar baz quux"
} -run
shell {ln -s ${tmpdir}/file ${tmpdir}/link}
varnish v1 -vcl {
import ${vmod_file};
backend b { .host = "${bad_ip}"; }
sub vcl_init {
new rdr = file.reader("${tmpdir}/link");
}
sub vcl_recv {
return (synth(200));
}
sub vcl_synth {
set resp.http.Get = rdr.get();
return (deliver);
}
}
client c1 -run
varnish v1 -vcl {
import ${vmod_file};
backend b { .host = "${bad_ip}"; }
...
...
@@ -137,6 +159,17 @@ varnish v1 -errvcl {not a regular file} {
}
}
shell {ln -s ${tmpdir} ${tmpdir}/dirlink}
varnish v1 -errvcl {not a regular file} {
import ${vmod_file};
backend b { .host = "${bad_ip}"; }
sub vcl_init {
new rdr = file.reader("${tmpdir}/dirlink");
}
}
varnish v1 -errvcl {vmod file failure: new rdr: name is empty} {
import ${vmod_file};
backend b { .host = "${bad_ip}"; }
...
...
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