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
e7fc6542
Commit
e7fc6542
authored
May 22, 2018
by
Poul-Henning Kamp
Committed by
Dridi Boukelmoune
Jun 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle string literal concatenation correctly.
Fixes #2685
parent
79c9415f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
c00068.vtc
bin/varnishtest/tests/c00068.vtc
+4
-1
vcc_expr.c
lib/libvcc/vcc_expr.c
+3
-0
No files found.
bin/varnishtest/tests/c00068.vtc
View file @
e7fc6542
...
@@ -10,6 +10,8 @@ server s1 {
...
@@ -10,6 +10,8 @@ server s1 {
} -start
} -start
varnish v1 -vcl+backend {
varnish v1 -vcl+backend {
import std;
sub vcl_backend_response {
sub vcl_backend_response {
if (bereq.url == "/333") {
if (bereq.url == "/333") {
set beresp.status = 333;
set beresp.status = 333;
...
@@ -18,7 +20,7 @@ varnish v1 -vcl+backend {
...
@@ -18,7 +20,7 @@ varnish v1 -vcl+backend {
}
}
sub vcl_deliver {
sub vcl_deliver {
if (req.url == "/332") {
if (req.url == "/332") {
return (synth(332, "F
OO"
));
return (synth(332, "F
" + "OO" + std.tolower("FOO")
));
} else if (req.url == "/333") {
} else if (req.url == "/333") {
return (synth(resp.status + 1000,
return (synth(resp.status + 1000,
resp.reason));
resp.reason));
...
@@ -64,6 +66,7 @@ client c2 {
...
@@ -64,6 +66,7 @@ client c2 {
txreq -url /332
txreq -url /332
rxresp
rxresp
expect resp.status == 332
expect resp.status == 332
expect resp.reason == "FOOfoo"
expect resp.http.restarts == 1
expect resp.http.restarts == 1
expect resp.bodylen == 1
expect resp.bodylen == 1
} -run
} -run
lib/libvcc/vcc_expr.c
View file @
e7fc6542
...
@@ -920,6 +920,7 @@ vcc_expr_add(struct vcc *tl, struct expr **e, vcc_type_t fmt)
...
@@ -920,6 +920,7 @@ vcc_expr_add(struct vcc *tl, struct expr **e, vcc_type_t fmt)
*
e
=
vcc_expr_edit
(
tl
,
STRINGS
,
*
e
=
vcc_expr_edit
(
tl
,
STRINGS
,
"
\v
1
\n\v
2"
,
*
e
,
e2
);
"
\v
1
\n\v
2"
,
*
e
,
e2
);
(
*
e
)
->
constant
=
EXPR_CONST
;
(
*
e
)
->
constant
=
EXPR_CONST
;
(
*
e
)
->
nstr
=
1
;
if
(
lit
)
if
(
lit
)
(
*
e
)
->
constant
|=
EXPR_STR_CONST
;
(
*
e
)
->
constant
|=
EXPR_STR_CONST
;
}
else
{
}
else
{
...
@@ -1297,6 +1298,8 @@ vcc_Expr(struct vcc *tl, vcc_type_t fmt)
...
@@ -1297,6 +1298,8 @@ vcc_Expr(struct vcc *tl, vcc_type_t fmt)
assert
(
fmt
!=
STRINGS
);
assert
(
fmt
!=
STRINGS
);
vcc_expr0
(
tl
,
&
e
,
fmt
);
vcc_expr0
(
tl
,
&
e
,
fmt
);
ERRCHK
(
tl
);
ERRCHK
(
tl
);
assert
(
e
->
fmt
==
fmt
);
vcc_expr_fmt
(
tl
->
fb
,
tl
->
indent
,
e
);
vcc_expr_fmt
(
tl
->
fb
,
tl
->
indent
,
e
);
VSB_printf
(
tl
->
fb
,
"
\n
"
);
VSB_printf
(
tl
->
fb
,
"
\n
"
);
vcc_delete_expr
(
e
);
vcc_delete_expr
(
e
);
...
...
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