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
4e1788a7
Unverified
Commit
4e1788a7
authored
Apr 30, 2021
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VRT_TIME_string to trigger VCL failure for unformatable time
as per pow-wow decision Ref #3308
parent
ffd88acd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
cache_vrt.c
bin/varnishd/cache/cache_vrt.c
+8
-8
r03308.vtc
bin/varnishtest/tests/r03308.vtc
+1
-1
No files found.
bin/varnishd/cache/cache_vrt.c
View file @
4e1788a7
...
...
@@ -837,17 +837,17 @@ VCL_STRING v_matchproto_()
VRT_TIME_string
(
VRT_CTX
,
VCL_TIME
t
)
{
char
*
p
;
uintptr_t
snapshot
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
snapshot
=
WS_Snapshot
(
ctx
->
ws
);
p
=
WS_Alloc
(
ctx
->
ws
,
VTIM_FORMAT_SIZE
);
if
(
p
!=
NULL
)
{
VTIM_format
(
t
,
p
);
if
(
*
p
==
'\0'
)
{
p
=
NULL
;
WS_Reset
(
ctx
->
ws
,
snapshot
);
}
if
(
p
==
NULL
)
{
VRT_fail
(
ctx
,
"Workspace overflow"
);
return
(
NULL
);
}
VTIM_format
(
t
,
p
);
if
(
*
p
==
'\0'
)
{
VRT_fail
(
ctx
,
"Unformatable VCL_TIME"
);
return
(
NULL
);
}
return
(
p
);
}
...
...
bin/varnishtest/tests/r03308.vtc
View file @
4e1788a7
...
...
@@ -16,5 +16,5 @@ varnish v1 -vcl+backend {
client c1 {
txreq
rxresp
expect resp.
http.ts == ""
expect resp.
status == 503
} -run
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