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
2eabf10f
Commit
2eabf10f
authored
Mar 10, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Require the "synthetic" argument to be function-like:
synthetic ( STRING_LIST ) ;
parent
5cf517e8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
8 deletions
+17
-8
builtin.vcl
bin/varnishd/builtin.vcl
+4
-4
b00017.vtc
bin/varnishtest/tests/b00017.vtc
+1
-1
r00936.vtc
bin/varnishtest/tests/r00936.vtc
+2
-1
r01287.vtc
bin/varnishtest/tests/r01287.vtc
+1
-1
v00018.vtc
bin/varnishtest/tests/v00018.vtc
+1
-1
vcc_action.c
lib/libvcc/vcc_action.c
+8
-0
No files found.
bin/varnishd/builtin.vcl
View file @
2eabf10f
...
@@ -137,7 +137,7 @@ sub vcl_deliver {
...
@@ -137,7 +137,7 @@ sub vcl_deliver {
sub vcl_error {
sub vcl_error {
set obj.http.Content-Type = "text/html; charset=utf-8";
set obj.http.Content-Type = "text/html; charset=utf-8";
set obj.http.Retry-After = "5";
set obj.http.Retry-After = "5";
synthetic {"
synthetic
(
{"
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
...
@@ -154,7 +154,7 @@ sub vcl_error {
...
@@ -154,7 +154,7 @@ sub vcl_error {
<p>
Varnish cache server
</p>
<p>
Varnish cache server
</p>
</body>
</body>
</html>
</html>
"};
"}
)
;
return (deliver);
return (deliver);
}
}
...
@@ -184,7 +184,7 @@ sub vcl_backend_response {
...
@@ -184,7 +184,7 @@ sub vcl_backend_response {
sub
vcl_backend_error
{
sub
vcl_backend_error
{
set
beresp
.
http
.
Content-Type =
"text/html; charset=utf-8"
;
set
beresp
.
http
.
Content-Type =
"text/html; charset=utf-8"
;
set
beresp
.
http
.
Retry-After =
"5"
;
set
beresp
.
http
.
Retry-After =
"5"
;
synthetic
{"
synthetic
(
{"
<?
xml
version=
"1.0"
encoding=
"utf-8"
?
>
<?
xml
version=
"1.0"
encoding=
"utf-8"
?
>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
...
@@ -201,7 +201,7 @@ sub vcl_backend_error {
...
@@ -201,7 +201,7 @@ sub vcl_backend_error {
<p>
Varnish cache server
</p>
<p>
Varnish cache server
</p>
</body>
</body>
</html>
</html>
"};
"}
)
;
return (deliver);
return (deliver);
}
}
...
...
bin/varnishtest/tests/b00017.vtc
View file @
2eabf10f
...
@@ -9,7 +9,7 @@ varnish v1 -vcl {
...
@@ -9,7 +9,7 @@ varnish v1 -vcl {
}
}
sub vcl_error {
sub vcl_error {
synthetic
"Custom vcl_error's synth output"
;
synthetic
("Custom vcl_error's synth output")
;
return (deliver);
return (deliver);
}
}
} -start
} -start
...
...
bin/varnishtest/tests/r00936.vtc
View file @
2eabf10f
...
@@ -9,7 +9,8 @@ varnish v1 -errvcl {'synthetic': not a valid action in method 'vcl_recv'} {
...
@@ -9,7 +9,8 @@ varnish v1 -errvcl {'synthetic': not a valid action in method 'vcl_recv'} {
backend foo { .host = "127.0.0.1"; }
backend foo { .host = "127.0.0.1"; }
sub vcl_recv {
sub vcl_recv {
synthetic "HELLOO"; return (error(503));
synthetic("HELLOO");
return (error(503));
}
}
}
}
bin/varnishtest/tests/r01287.vtc
View file @
2eabf10f
...
@@ -8,7 +8,7 @@ varnish v1 -vcl+backend {
...
@@ -8,7 +8,7 @@ varnish v1 -vcl+backend {
return (error(200, "OK"));
return (error(200, "OK"));
}
}
sub vcl_error {
sub vcl_error {
synthetic
obj.http.blank
;
synthetic
(obj.http.blank)
;
return (deliver);
return (deliver);
}
}
} -start
} -start
...
...
bin/varnishtest/tests/v00018.vtc
View file @
2eabf10f
...
@@ -100,7 +100,7 @@ varnish v1 -errvcl {Expected an action, 'if', '{' or '}'} {
...
@@ -100,7 +100,7 @@ varnish v1 -errvcl {Expected an action, 'if', '{' or '}'} {
varnish v1 -errvcl {Unknown token '<<' when looking for STRING_LIST} {
varnish v1 -errvcl {Unknown token '<<' when looking for STRING_LIST} {
backend b { .host = "127.0.0.1"; }
backend b { .host = "127.0.0.1"; }
sub vcl_error { synthetic << "foo"; }
sub vcl_error { synthetic
(
<< "foo"; }
}
}
varnish v1 -errvcl {Syntax has changed, use:} {
varnish v1 -errvcl {Syntax has changed, use:} {
...
...
lib/libvcc/vcc_action.c
View file @
2eabf10f
...
@@ -396,10 +396,18 @@ parse_synthetic(struct vcc *tl)
...
@@ -396,10 +396,18 @@ parse_synthetic(struct vcc *tl)
{
{
vcc_NextToken
(
tl
);
vcc_NextToken
(
tl
);
ExpectErr
(
tl
,
'('
);
ERRCHK
(
tl
);
vcc_NextToken
(
tl
);
Fb
(
tl
,
1
,
"VRT_synth_page(ctx, "
);
Fb
(
tl
,
1
,
"VRT_synth_page(ctx, "
);
vcc_Expr
(
tl
,
STRING_LIST
);
vcc_Expr
(
tl
,
STRING_LIST
);
ERRCHK
(
tl
);
ERRCHK
(
tl
);
Fb
(
tl
,
0
,
");
\n
"
);
Fb
(
tl
,
0
,
");
\n
"
);
ExpectErr
(
tl
,
')'
);
vcc_NextToken
(
tl
);
ERRCHK
(
tl
);
}
}
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
...
...
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