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
5e1e35a5
Commit
5e1e35a5
authored
Jun 30, 2014
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix incorrect representation when using reals
Fixes #1532
parent
161b42bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
r01532.vtc
bin/varnishtest/tests/r01532.vtc
+20
-0
vcc_expr.c
lib/libvcc/vcc_expr.c
+1
-1
No files found.
bin/varnishtest/tests/r01532.vtc
0 → 100644
View file @
5e1e35a5
varnishtest "Incorrect representation when using reals - #1532"
server s1 {
rxreq
txresp
} -start
varnish v1 -vcl+backend {
import ${vmod_std};
sub vcl_deliver {
set resp.http.x-foo = std.real2time(1140618699.00);
}
} -start
client c1 {
txreq
rxresp
expect resp.http.x-foo == "Wed, 22 Feb 2006 14:31:39 GMT"
} -run
lib/libvcc/vcc_expr.c
View file @
5e1e35a5
...
...
@@ -749,7 +749,7 @@ vcc_expr4(struct vcc *tl, struct expr **e, enum var_type fmt)
e1
=
vcc_mk_expr
(
BYTES
,
"%.1f"
,
d
);
ERRCHK
(
tl
);
}
else
if
(
fmt
==
REAL
)
{
e1
=
vcc_mk_expr
(
REAL
,
"%
g
"
,
vcc_DoubleVal
(
tl
));
e1
=
vcc_mk_expr
(
REAL
,
"%
f
"
,
vcc_DoubleVal
(
tl
));
ERRCHK
(
tl
);
}
else
{
e1
=
vcc_mk_expr
(
INT
,
"%.*s"
,
PF
(
tl
->
t
));
...
...
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