Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
ecef4851
Commit
ecef4851
authored
Sep 24, 2019
by
Andrew Wiik
Committed by
Nils Goroll
Sep 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the syntax 'backend name none;'
parent
7c5b58cb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
1 deletion
+55
-1
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+0
-1
v00060.vtc
bin/varnishtest/tests/v00060.vtc
+45
-0
vcc_backend.c
lib/libvcc/vcc_backend.c
+10
-0
No files found.
bin/varnishd/cache/cache_req_fsm.c
View file @
ecef4851
...
...
@@ -792,7 +792,6 @@ cnt_recv_prep(struct req *req, const char *ci)
/* By default we use the first backend */
req
->
director_hint
=
VCL_DefaultDirector
(
req
->
vcl
);
AN
(
req
->
director_hint
);
req
->
d_ttl
=
-
1
;
req
->
d_grace
=
-
1
;
...
...
bin/varnishtest/tests/v00060.vtc
0 → 100644
View file @
ecef4851
varnishtest "NULL backend allowed"
server s1 {
rxreq
txresp
} -start
varnish v1 -vcl {
backend default none;
} -start
client c1 {
txreq
rxresp
expect resp.status == 503
} -run
# Test NULL none default backend
varnish v1 -vcl+backend {
backend null_backend none;
backend null_backend_uppercase None;
sub vcl_recv {
if (req.url ~ "/no_backend_lowercase") {
set req.backend_hint = null_backend;
} else if (req.url ~ "no_backend_uppercase") {
set req.backend_hint = null_backend_uppercase;
}
}
}
client c1 {
txreq
rxresp
expect resp.status == 200
txreq -url "/no_backend_lowercase"
rxresp
expect resp.status == 503
txreq -url "/no_backend_uppercase"
rxresp
expect resp.status == 503
} -run
lib/libvcc/vcc_backend.c
View file @
ecef4851
...
...
@@ -321,6 +321,16 @@ vcc_ParseHostDef(struct vcc *tl, const struct token *t_be, const char *vgcname)
"?proxy_header"
,
NULL
);
if
(
tl
->
t
->
tok
==
ID
&&
(
vcc_IdIs
(
tl
->
t
,
"none"
)
||
vcc_IdIs
(
tl
->
t
,
"None"
)))
{
vsb
=
VSB_new_auto
();
AN
(
vsb
);
tl
->
fb
=
vsb
;
Fb
(
tl
,
0
,
"
\n\t
%s = (NULL);
\n
"
,
vgcname
);
vcc_NextToken
(
tl
);
SkipToken
(
tl
,
';'
);
return
;
}
SkipToken
(
tl
,
'{'
);
vsb
=
VSB_new_auto
();
...
...
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