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
4c4224e0
Commit
4c4224e0
authored
Sep 20, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test an error on update.
parent
d0bc503b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
get.vtc
src/tests/get.vtc
+22
-1
vmod_file.c
src/vmod_file.c
+1
-4
No files found.
src/tests/get.vtc
View file @
4c4224e0
...
...
@@ -38,11 +38,12 @@ varnish v1 -vcl+backend {
}
sub vcl_recv {
set req.http.Get = rdr.get();
return (synth(200));
}
sub vcl_synth {
set resp.http.Get = r
dr.get()
;
set resp.http.Get = r
eq.http.Get
;
return (deliver);
}
}
...
...
@@ -58,3 +59,23 @@ client c1 {
expect resp.status == 200
expect resp.http.Get == "quux baz bar foo"
} -run
shell {rm -f ${tmpdir}/file}
delay .1
client c1 {
txreq
rxresp
expect resp.status == 503
expect resp.reason == "VCL failed"
} -run
logexpect l1 -v v1 -d 1 -g vxid -q "VCL_Error" {
expect 0 * Begin req
expect * = VCL_Error {^rdr\.get\(\): vmod file failure: rdr: cannot read info about}
expect * = End
} -run
logexpect l1 -v v1 -d 1 -g raw -q "Error" {
expect * 0 Error {^vmod file failure: rdr: cannot read info about}
} -run
src/vmod_file.c
View file @
4c4224e0
...
...
@@ -47,9 +47,6 @@
#include "vcc_if.h"
#define FAIL(ctx, msg) \
VRT_fail((ctx), "vmod file failure: " msg)
#define VFAIL(ctx, fmt, ...) \
VRT_fail((ctx), "vmod file failure: " fmt, __VA_ARGS__)
...
...
@@ -352,7 +349,7 @@ vmod_reader_get(VRT_CTX, struct VPFX(file_reader) *rdr)
}
AN
(
strcmp
(
rdr
->
errbuf
,
NO_ERR
));
V
FAIL
(
ctx
,
"%s.get(): %s"
,
rdr
->
vcl_name
,
rdr
->
errbuf
);
V
RT_fail
(
ctx
,
"%s.get(): %s"
,
rdr
->
vcl_name
,
rdr
->
errbuf
);
return
(
NULL
);
}
...
...
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