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
de914862
Commit
de914862
authored
May 14, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add explanation for not streaming
parent
b0bea23e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+20
-4
No files found.
bin/varnishd/cache/cache_esi_deliver.c
View file @
de914862
...
...
@@ -466,10 +466,25 @@ ved_pretend_gzip(struct req *req, enum vdp_action act, void **priv,
/*---------------------------------------------------------------------
* Include an object in a gzip'ed ESI object delivery
*
* This is not written as a VDP (yet) because it relies on the
* OA_GZIPBITS which only becomes available when the input side
* has fully digested the object and located the magic bit positions.
*
* We can improve this two ways.
*
* One is to run a gunzip instance here, to find the stopbit ourselves,
* but that would be double work, in particular when passing a gziped
* object, where we would have two null-gunzips.
*
* The other is to have the input side guarantee that OA_GZIPBITS::stopbit
* always is committed before the chunk of data containing it. We would
* be required to poll OA_GZIPBITS on every chunk presented, but that is
* much cheaper than running a gunzip instance.
*/
static
void
ved_stripgzip
(
struct
req
*
req
)
ved_stripgzip
(
struct
req
*
req
,
struct
busyobj
*
bo
)
{
ssize_t
start
,
last
,
stop
,
lpad
;
ssize_t
l
;
...
...
@@ -490,6 +505,9 @@ ved_stripgzip(struct req *req)
CHECK_OBJ_NOTNULL
(
req
->
objcore
,
OBJCORE_MAGIC
);
CAST_OBJ_NOTNULL
(
ecx
,
req
->
transport_priv
,
ECX_MAGIC
);
if
(
bo
!=
NULL
)
VBO_waitstate
(
bo
,
BOS_FINISHED
);
AN
(
ObjCheckFlag
(
req
->
wrk
,
req
->
objcore
,
OF_GZIPED
));
/*
...
...
@@ -699,9 +717,7 @@ VED_Deliver(struct req *req, struct busyobj *bo)
req
->
res_mode
|=
RES_ESI_CHILD
;
i
=
ObjCheckFlag
(
req
->
wrk
,
req
->
objcore
,
OF_GZIPED
);
if
(
ecx
->
isgzip
&&
i
&&
!
(
req
->
res_mode
&
RES_ESI
))
{
if
(
bo
!=
NULL
)
VBO_waitstate
(
bo
,
BOS_FINISHED
);
ved_stripgzip
(
req
);
ved_stripgzip
(
req
,
bo
);
}
else
{
if
(
ecx
->
isgzip
&&
!
i
)
VDP_push
(
req
,
ved_pretend_gzip
,
ecx
,
1
);
...
...
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