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
5972f082
Commit
5972f082
authored
Sep 09, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reallow '-' in VCL names by popular demand.
Pass childs status on failure Make atexit more robust
parent
478c664f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
mgt_vcl.c
bin/varnishd/mgt/mgt_vcl.c
+8
-2
v00048.vtc
bin/varnishtest/tests/v00048.vtc
+7
-7
No files found.
bin/varnishd/mgt/mgt_vcl.c
View file @
5972f082
...
...
@@ -103,7 +103,10 @@ mcf_bad_vclname(struct cli *cli, const char *name)
if
(
!
vct_isalpha
(
*
p
))
bad
=
*
p
;
for
(
p
++
;
bad
==
0
&&
*
p
!=
'\0'
;
p
++
)
if
(
!
vct_isalpha
(
*
p
)
&&
!
vct_isdigit
(
*
p
)
&&
*
p
!=
'_'
)
if
(
!
vct_isalpha
(
*
p
)
&&
!
vct_isdigit
(
*
p
)
&&
*
p
!=
'_'
&&
*
p
!=
'-'
)
bad
=
*
p
;
if
(
bad
)
{
VCLI_SetResult
(
cli
,
CLIS_PARAM
);
...
...
@@ -213,6 +216,8 @@ mgt_vcl_del(struct vclprog *vp)
char
*
p
;
CHECK_OBJ_NOTNULL
(
vp
,
VCLPROG_MAGIC
);
while
(
!
VTAILQ_EMPTY
(
&
vp
->
dto
))
mgt_vcl_dep_del
(
VTAILQ_FIRST
(
&
vp
->
dto
));
while
(
!
VTAILQ_EMPTY
(
&
vp
->
dfrom
))
mgt_vcl_dep_del
(
VTAILQ_FIRST
(
&
vp
->
dfrom
));
...
...
@@ -352,7 +357,7 @@ mgt_new_vcl(struct cli *cli, const char *vclname, const char *vclsrc,
vp
->
name
,
vp
->
fname
,
vp
->
warm
,
vp
->
state
))
{
mgt_vcl_del
(
vp
);
VCLI_Out
(
cli
,
"%s"
,
p
);
VCLI_SetResult
(
cli
,
CLIS_PARAM
);
VCLI_SetResult
(
cli
,
status
);
}
free
(
p
);
}
...
...
@@ -748,6 +753,7 @@ mgt_vcl_atexit(void)
if
(
getpid
()
!=
mgt_pid
)
return
;
active_vcl
=
NULL
;
do
{
vp
=
VTAILQ_FIRST
(
&
vclhead
);
if
(
vp
!=
NULL
)
...
...
bin/varnishtest/tests/v00048.vtc
View file @
5972f082
...
...
@@ -73,16 +73,16 @@ varnish v1 -clierr 106 "vcl.discard foo"
varnish v1 -stop
varnish v1 -cliok "vcl.list"
varnish v1 -clierr 106 "vcl.label fo
o
vcl0"
varnish v1 -cliok "vcl.label fo
o
vcl1"
varnish v1 -clierr 300 "vcl.label bar fo
o
"
varnish v1 -clierr 106 "vcl.label fo
-
vcl0"
varnish v1 -cliok "vcl.label fo
-
vcl1"
varnish v1 -clierr 300 "vcl.label bar fo
-
"
varnish v1 -clierr 200 "vcl.state vcl1 warm"
varnish v1 -clierr 200 "vcl.state vcl1 auto"
varnish v1 -clierr 300 "vcl.state vcl1 cold"
varnish v1 -clierr 300 "vcl.discard vcl1"
varnish v1 -cliok "vcl.list"
varnish v1 -cliok "vcl.use fo
o
"
varnish v1 -clierr 300 "vcl.discard fo
o
"
varnish v1 -cliok "vcl.use fo
-
"
varnish v1 -clierr 300 "vcl.discard fo
-
"
varnish v1 -cliok "vcl.list"
server s1 -start
...
...
@@ -91,8 +91,8 @@ varnish v1 -start
client c1 -run
varnish v1 -stop
varnish v1 -cliok "vcl.use vcl1"
varnish v1 -cliok "vcl.discard fo
o
"
varnish v1 -clierr 106 "vcl.discard fo
o
"
varnish v1 -cliok "vcl.discard fo
-
"
varnish v1 -clierr 106 "vcl.discard fo
-
"
varnish v1 -start
varnish v1 -cliok "vcl.label snarf vcl1"
...
...
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