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
e09ed9d8
Commit
e09ed9d8
authored
Oct 23, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the pretend_gzip to simplify delivery of esi objects
parent
99fe0674
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
32 deletions
+18
-32
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+1
-16
cache_http1_deliver.c
bin/varnishd/http1/cache_http1_deliver.c
+17
-16
No files found.
bin/varnishd/cache/cache_esi_deliver.c
View file @
e09ed9d8
...
@@ -362,22 +362,7 @@ ESI_Deliver(struct req *req)
...
@@ -362,22 +362,7 @@ ESI_Deliver(struct req *req)
sl
-=
l2
;
sl
-=
l2
;
l
-=
l2
;
l
-=
l2
;
if
(
req
->
gzip_resp
&&
isgzip
)
{
/*
* We have a gzip'ed VEC and delivers
* a gzip'ed ESI response.
*/
(
void
)
VDP_bytes
(
req
,
VDP_NULL
,
pp
,
l2
);
(
void
)
VDP_bytes
(
req
,
VDP_NULL
,
pp
,
l2
);
}
else
if
(
req
->
gzip_resp
)
{
/*
* A gzip'ed ESI response, but the VEC
* was not gzip'ed.
*/
(
void
)
VED_pretend_gzip
(
req
,
VDP_NULL
,
NULL
,
pp
,
l2
);
}
else
{
(
void
)
VDP_bytes
(
req
,
VDP_NULL
,
pp
,
l2
);
}
pp
+=
l2
;
pp
+=
l2
;
if
(
sl
==
0
)
{
if
(
sl
==
0
)
{
ois
=
ObjIter
(
req
->
objcore
,
oi
,
ois
=
ObjIter
(
req
->
objcore
,
oi
,
...
...
bin/varnishd/http1/cache_http1_deliver.c
View file @
e09ed9d8
...
@@ -341,30 +341,31 @@ V1D_Deliver(struct req *req, struct busyobj *bo)
...
@@ -341,30 +341,31 @@ V1D_Deliver(struct req *req, struct busyobj *bo)
ois
=
OIS_DONE
;
ois
=
OIS_DONE
;
if
(
!
req
->
wantbody
)
{
if
(
!
req
->
wantbody
)
{
/* This was a HEAD or conditional request */
/* This was a HEAD or conditional request */
}
else
if
(
req
->
res_mode
&
RES_ESI
)
{
}
else
if
(
req
->
esi_level
>
0
)
{
if
(
req
->
esi_level
==
0
&&
req
->
res_mode
&
RES_GUNZIP
)
VDP_push
(
req
,
VDP_gunzip
,
NULL
);
ESI_Deliver
(
req
);
}
else
if
(
req
->
res_mode
&
RES_ESI_CHILD
)
{
if
(
req
->
gzip_resp
&&
if
(
req
->
gzip_resp
&&
!
ObjCheckFlag
(
req
->
wrk
,
req
->
objcore
,
OF_GZIPED
))
{
ObjCheckFlag
(
req
->
wrk
,
req
->
objcore
,
OF_GZIPED
))
{
VDP_push
(
req
,
VED_pretend_gzip
,
NULL
);
ois
=
v1d_WriteDirObj
(
req
);
}
else
if
(
req
->
gzip_resp
)
{
if
(
bo
!=
NULL
)
if
(
bo
!=
NULL
)
VBO_waitstate
(
bo
,
BOS_FINISHED
);
VBO_waitstate
(
bo
,
BOS_FINISHED
);
ESI_DeliverChild
(
req
);
ESI_DeliverChild
(
req
);
}
else
if
(
!
req
->
gzip_resp
&&
ObjCheckFlag
(
req
->
wrk
,
req
->
objcore
,
OF_GZIPED
))
{
VDP_push
(
req
,
VDP_gunzip
,
NULL
);
ois
=
v1d_WriteDirObj
(
req
);
}
else
{
}
else
{
/* The toplevel will gunzip if needed */
if
(
req
->
gzip_resp
&&
!
ObjCheckFlag
(
req
->
wrk
,
req
->
objcore
,
OF_GZIPED
))
VDP_push
(
req
,
VED_pretend_gzip
,
NULL
);
else
if
(
!
req
->
gzip_resp
&&
ObjCheckFlag
(
req
->
wrk
,
req
->
objcore
,
OF_GZIPED
))
VDP_push
(
req
,
VDP_gunzip
,
NULL
);
if
(
req
->
res_mode
&
RES_ESI
)
ESI_Deliver
(
req
);
else
ois
=
v1d_WriteDirObj
(
req
);
ois
=
v1d_WriteDirObj
(
req
);
}
}
}
else
{
}
else
{
if
(
req
->
res_mode
&
RES_GUNZIP
)
if
(
req
->
res_mode
&
RES_GUNZIP
)
VDP_push
(
req
,
VDP_gunzip
,
NULL
);
VDP_push
(
req
,
VDP_gunzip
,
NULL
);
if
(
req
->
res_mode
&
RES_ESI
)
ESI_Deliver
(
req
);
else
ois
=
v1d_WriteDirObj
(
req
);
ois
=
v1d_WriteDirObj
(
req
);
}
}
(
void
)
VDP_bytes
(
req
,
VDP_FLUSH
,
NULL
,
0
);
(
void
)
VDP_bytes
(
req
,
VDP_FLUSH
,
NULL
,
0
);
...
...
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