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
60835401
Commit
60835401
authored
Nov 12, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor polish and a test-case to get out in the corners of param-tweaking
parent
ea2c5b4d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
7 deletions
+35
-7
mgt_param.c
bin/varnishd/mgt/mgt_param.c
+5
-5
mgt_param_tweak.c
bin/varnishd/mgt/mgt_param_tweak.c
+2
-2
b00042.vtc
bin/varnishtest/tests/b00042.vtc
+28
-0
No files found.
bin/varnishd/mgt/mgt_param.c
View file @
60835401
...
...
@@ -330,14 +330,14 @@ MCF_ParamSet(struct cli *cli, const char *param, const char *val)
*
heritage
.
param
=
mgt_param
;
if
(
cli
->
result
!=
CLIS_OK
)
{
VCLI_Out
(
cli
,
"
(attempting to set param %s to %s)
\n
"
,
VCLI_Out
(
cli
,
"
\n
(attempting to set param %s to %s)
"
,
pp
->
name
,
val
);
}
else
if
(
child_pid
>=
0
&&
pp
->
flags
&
MUST_RESTART
)
{
VCLI_Out
(
cli
,
"Change will take effect"
" when child is restarted"
);
VCLI_Out
(
cli
,
"
\n
Change will take effect
when child is restarted"
);
}
else
if
(
pp
->
flags
&
MUST_RELOAD
)
{
VCLI_Out
(
cli
,
"Change will take effect"
" when VCL script is reloaded"
);
VCLI_Out
(
cli
,
"
\n
Change will take effect
when VCL script is reloaded"
);
}
}
...
...
bin/varnishd/mgt/mgt_param_tweak.c
View file @
60835401
...
...
@@ -93,12 +93,12 @@ tweak_generic_double(struct vsb *vsb, volatile double *dest,
}
if
(
min
!=
NULL
&&
u
<
minv
)
{
VSB_printf
(
vsb
,
"
Timeout m
ust be greater or equal to %s
\n
"
,
min
);
"
M
ust be greater or equal to %s
\n
"
,
min
);
return
(
-
1
);
}
if
(
max
!=
NULL
&&
u
>
maxv
)
{
VSB_printf
(
vsb
,
"
Timeout m
ust be less than or equal to %s
\n
"
,
max
);
"
M
ust be less than or equal to %s
\n
"
,
max
);
return
(
-
1
);
}
*
dest
=
u
;
...
...
bin/varnishtest/tests/b00042.vtc
0 → 100644
View file @
60835401
varnishtest "param edge cases"
varnish v1 -vcl {backend foo {.host = "127.0.0.1";}} -start
varnish v1 -clierr "106" "param.set default_ttl -1"
varnish v1 -clierr "106" "param.set acceptor_sleep_max 20"
varnish v1 -clierr "200" "param.set prefer_ipv6 off"
varnish v1 -clierr "200" "param.set prefer_ipv6 no"
varnish v1 -clierr "200" "param.set prefer_ipv6 disable"
varnish v1 -clierr "200" "param.set prefer_ipv6 false"
varnish v1 -clierr "200" "param.set prefer_ipv6 on"
varnish v1 -clierr "200" "param.set prefer_ipv6 yes"
varnish v1 -clierr "200" "param.set prefer_ipv6 enable"
varnish v1 -clierr "200" "param.set prefer_ipv6 true"
varnish v1 -clierr "106" "param.set prefer_ipv6 foobar"
varnish v1 -clierr "106" "param.set http_max_hdr 0"
varnish v1 -clierr "106" "param.set http_max_hdr 1000000"
varnish v1 -clierr "106" "param.set workspace_thread 1b"
varnish v1 -clierr "106" "param.set workspace_thread 1b"
varnish v1 -clierr "106" "param.set workspace_thread 1x"
varnish v1 -clierr "106" "param.set workspace_thread x"
varnish v1 -clierr "106" "param.set user ///"
varnish v1 -clierr "106" "param.set user ///"
varnish v1 -clierr "106" {param.set listen_address ""}
varnish v1 -clierr "106" {param.set listen_address ",,"}
varnish v1 -clierr "106" {param.set listen_address "\""}
varnish v1 -clierr "106" {param.set pool_sess "\""}
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