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
6fa90ee4
Commit
6fa90ee4
authored
Feb 15, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Take another stab at fixing #861 by clearing the correct bit
position of the "last" bit in the included ESI object.
parent
6cc60355
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
cache_esi_deliver.c
bin/varnishd/cache_esi_deliver.c
+1
-1
r00861.vtc
bin/varnishtest/tests/r00861.vtc
+23
-3
No files found.
bin/varnishd/cache_esi_deliver.c
View file @
6fa90ee4
...
@@ -497,7 +497,7 @@ ESI_DeliverChild(const struct sess *sp)
...
@@ -497,7 +497,7 @@ ESI_DeliverChild(const struct sess *sp)
*/
*/
cc
=
ved_deliver_byterange
(
sp
,
start
/
8
,
last
/
8
);
cc
=
ved_deliver_byterange
(
sp
,
start
/
8
,
last
/
8
);
//printf("CC_LAST %x\n", cc);
//printf("CC_LAST %x\n", cc);
cc
&=
~
(
1U
<<
(
star
t
&
7
));
cc
&=
~
(
1U
<<
(
las
t
&
7
));
ved_sendchunk
(
sp
,
NULL
,
0
,
&
cc
,
1
);
ved_sendchunk
(
sp
,
NULL
,
0
,
&
cc
,
1
);
cc
=
ved_deliver_byterange
(
sp
,
1
+
last
/
8
,
stop
/
8
);
cc
=
ved_deliver_byterange
(
sp
,
1
+
last
/
8
,
stop
/
8
);
//printf("CC_STOP %x (%d)\n", cc, (int)(stop & 7));
//printf("CC_STOP %x (%d)\n", cc, (int)(stop & 7));
...
...
bin/varnishtest/tests/r00861.vtc
View file @
6fa90ee4
...
@@ -12,18 +12,38 @@ server s1 {
...
@@ -12,18 +12,38 @@ server s1 {
rxreq
rxreq
expect req.url == "/bar"
expect req.url == "/bar"
txresp -body <BAR>
txresp -body <BAR>
rxreq
expect req.url == "/barf"
txresp -body {[{"program":true,"id":972389,"vendorId":"15451701","starttime":1297777500000,"endtime":1297783500000,"title":"Swimming Pool","oTitle":"true","genre":"0x10x0","timeshiftEnabled":true},{"program":true,"id":972391,"vendorId":"15451702","starttime":1297783500000,"endtime":1297785000000,"title":"Fashion -Trends","oTitle":null,"genre":"0x30x0","timeshiftEnabled":true},{"program":true,"id":972384,"vendorId":"15451703","starttime":1297785000000,"endtime":1297786500000,"title":"Fashion - mænd","oTitle":null,"genre":"0x30x0","timeshiftEnabled":true},{"program":true,"id":972388,"vendorId":"15451704","starttime":1297786500000,"endtime":1297789800000,"title":"The Day Before","oTitle":"true","genre":"0x30x0","timeshiftEnabled":true},{"program":true,"id":972393,"vendorId":"15451705","starttime":1297789800000,"endtime":1297793100000,"title":"Kessels øje","oTitle":null,"genre":"0x20x3","timeshiftEnabled":true}]}
rxreq
expect req.url == "/2"
txresp -body { <esi:include src="/barf" />}
} -start
} -start
varnish v1 \
varnish v1 \
-vcl+backend {
-vcl+backend {
sub vcl_fetch {
sub vcl_fetch {
set beresp.do_esi = true;
if (req.url == "/1" || req.url == "/2") {
set beresp.do_gzip = true;
set beresp.do_esi = true;
set beresp.do_gzip = true;
}
}
}
} -start
} -start
client c1 {
client c1 {
txreq -url "/1"
txreq -url "/1"
rxresp
rxresp
} -run
txreq -url "/barf" -hdr "Accept-Encoding: gzip"
rxresp
expect resp.http.Content-Encoding == resp.http.Content-Encoding
expect resp.bodylen == 909
txreq -url "/2" -hdr "Accept-Encoding: gzip"
rxresp
gunzip
expect resp.bodylen == 910
} -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