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
ce09d2ed
Commit
ce09d2ed
authored
Nov 01, 2011
by
Poul-Henning Kamp
Committed by
Tollef Fog Heen
Mar 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a missing case: ESI parent document gunzip'ed but included
document gzip'ed. Fixes #1029
parent
ab7a91ed
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
1 deletion
+38
-1
cache_esi_parse.c
bin/varnishd/cache_esi_parse.c
+1
-1
cache_response.c
bin/varnishd/cache_response.c
+3
-0
r01029.vtc
bin/varnishtest/tests/r01029.vtc
+34
-0
No files found.
bin/varnishd/cache_esi_parse.c
View file @
ce09d2ed
...
...
@@ -801,7 +801,7 @@ VEP_parse(const struct sess *sp, const char *p, size_t l)
vep
->
state
=
VEP_ATTR
;
}
else
if
(
p
<
e
)
{
vep_error
(
vep
,
"XML 1.0 Illegal attribute tart char"
);
"XML 1.0 Illegal attribute
s
tart char"
);
vep
->
state
=
VEP_TAGERROR
;
}
}
else
if
(
vep
->
state
==
VEP_TAGERROR
)
{
...
...
bin/varnishd/cache_response.c
View file @
ce09d2ed
...
...
@@ -312,6 +312,9 @@ RES_WriteObj(struct sess *sp)
ESI_Deliver
(
sp
);
}
else
if
(
sp
->
wrk
->
res_mode
&
RES_ESI_CHILD
&&
sp
->
wrk
->
gzip_resp
)
{
ESI_DeliverChild
(
sp
);
}
else
if
(
sp
->
wrk
->
res_mode
&
RES_ESI_CHILD
&&
!
sp
->
wrk
->
gzip_resp
&&
sp
->
obj
->
gziped
)
{
res_WriteGunzipObj
(
sp
);
}
else
if
(
sp
->
wrk
->
res_mode
&
RES_GUNZIP
)
{
res_WriteGunzipObj
(
sp
);
}
else
{
...
...
bin/varnishtest/tests/r01029.vtc
0 → 100644
View file @
ce09d2ed
varnishtest "#1029"
server s1 {
rxreq
expect req.url == "/bar"
txresp -gzipbody {[bar]}
rxreq
expect req.url == "/foo"
txresp -body {<h1>FOO<esi:include src="/bar"/>BARF</h1>}
} -start
varnish v1 -vcl+backend {
sub vcl_fetch {
set beresp.do_esi = true;
if (req.url == "/foo") {
set beresp.ttl = 0s;
} else {
set beresp.ttl = 10m;
}
}
} -start
client c1 {
txreq -url "/bar" -hdr "Accept-Encoding: gzip"
rxresp
gunzip
expect resp.bodylen == 5
txreq -url "/foo" -hdr "Accept-Encoding: gzip"
rxresp
expect resp.bodylen == 21
} -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