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
c654ff91
Commit
c654ff91
authored
Aug 03, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Complain if there are sub-arguments to the -a protocol specs which don't
understand them. Fixes: #1770
parent
561b56ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
mgt_acceptor.c
bin/varnishd/mgt/mgt_acceptor.c
+4
-0
r01770.vtc
bin/varnishtest/tests/r01770.vtc
+5
-0
No files found.
bin/varnishd/mgt/mgt_acceptor.c
View file @
c654ff91
...
...
@@ -192,9 +192,13 @@ MAC_Arg(const char *arg)
if
(
av
[
2
]
==
NULL
||
!
strcmp
(
av
[
2
],
"HTTP/1"
))
{
mh
->
first_step
=
S_STP_H1NEWSESS
;
mh
->
proto_name
=
"HTTP/1"
;
if
(
av
[
2
]
!=
NULL
&&
av
[
3
]
!=
NULL
)
ARGV_ERR
(
"Too many sub-arguments to -a(HTTP/1))
\n
"
);
}
else
if
(
!
strcmp
(
av
[
2
],
"PROXY"
))
{
mh
->
first_step
=
S_STP_PROXYNEWSESS
;
mh
->
proto_name
=
"PROXY"
;
if
(
av
[
3
]
!=
NULL
)
ARGV_ERR
(
"Too many sub-arguments to -a(PROXY))
\n
"
);
}
else
{
ARGV_ERR
(
"Unknown protocol '%s'
\n
"
,
av
[
2
]);
}
...
...
bin/varnishtest/tests/r01770.vtc
0 → 100644
View file @
c654ff91
varnishtest "bad protocol specs for -a"
err_shell "Too many sub-arguments" "${varnishd} -a 127.0.0.1:80000,PROXY,FOO -d 2>&1"
err_shell "Too many sub-arguments" "${varnishd} -a 127.0.0.1:80000,HTTP/1,FOO -d 2>&1"
err_shell "Too many sub-arguments" "${varnishd} -a 127.0.0.1:80000,HTTP/1 -d 2>&1"
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