Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
374c3a23
Commit
374c3a23
authored
Nov 01, 2011
by
Poul-Henning Kamp
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
aef83370
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 @
374c3a23
...
...
@@ -801,7 +801,7 @@ VEP_Parse(const struct worker *w, 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 @
374c3a23
...
...
@@ -307,6 +307,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 @
374c3a23
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