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
3775948d
Commit
3775948d
authored
Sep 20, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test error handling for an illegal TTL.
And improve the error message a bit.
parent
4f24cb21
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
get.vtc
src/tests/get.vtc
+9
-0
vmod_file.c
src/vmod_file.c
+1
-1
No files found.
src/tests/get.vtc
View file @
3775948d
...
...
@@ -100,3 +100,12 @@ varnish v1 -errvcl {vmod file failure: new rdr: name is empty} {
new rdr = file.reader("");
}
}
varnish v1 -errvcl {vmod file failure: new rdr: ttl -1.000 must be > 0s} {
import ${vmod_file};
backend b { .host = "${bad_ip}"; }
sub vcl_init {
new rdr = file.reader("foo", ttl=-1s);
}
}
src/vmod_file.c
View file @
3775948d
...
...
@@ -208,7 +208,7 @@ vmod_reader__init(VRT_CTX, struct VPFX(file_reader) **rdrp,
return
;
}
if
(
ttl
<=
0
)
{
VFAIL
(
ctx
,
"new %s: ttl %.03f must be > 0"
,
vcl_name
,
ttl
);
VFAIL
(
ctx
,
"new %s: ttl %.03f must be > 0
s
"
,
vcl_name
,
ttl
);
return
;
}
...
...
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