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
3341de57
Commit
3341de57
authored
May 14, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Straighten out ESI delivery some more.
parent
e3712a45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+12
-8
No files found.
bin/varnishd/cache/cache_esi_deliver.c
View file @
3341de57
...
...
@@ -63,13 +63,16 @@ struct ecx {
/*--------------------------------------------------------------------*/
static
void
ved_include
(
struct
req
*
preq
,
const
char
*
src
,
const
char
*
host
)
ved_include
(
struct
req
*
preq
,
const
char
*
src
,
const
char
*
host
,
struct
ecx
*
ecx
)
{
struct
worker
*
wrk
;
struct
req
*
req
;
enum
req_fsm_nxt
s
;
struct
transport
xp
;
CHECK_OBJ_NOTNULL
(
preq
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
ecx
,
ECX_MAGIC
);
wrk
=
preq
->
wrk
;
if
(
preq
->
esi_level
>=
cache_param
->
max_esi_depth
)
...
...
@@ -115,7 +118,7 @@ ved_include(struct req *preq, const char *src, const char *host)
/* Set Accept-Encoding according to what we want */
http_Unset
(
req
->
http0
,
H_Accept_Encoding
);
if
(
preq
->
gzip_res
p
)
if
(
ecx
->
isgzi
p
)
http_ForceHeader
(
req
->
http0
,
H_Accept_Encoding
,
"gzip"
);
/* Client content already taken care of */
...
...
@@ -137,9 +140,7 @@ ved_include(struct req *preq, const char *src, const char *host)
req
->
t_req
=
preq
->
t_req
;
assert
(
isnan
(
req
->
t_first
));
assert
(
isnan
(
req
->
t_prev
));
req
->
gzip_resp
=
preq
->
gzip_resp
;
req
->
crc
=
preq
->
crc
;
req
->
l_crc
=
preq
->
l_crc
;
req
->
gzip_resp
=
ecx
->
isgzip
;
INIT_OBJ
(
&
xp
,
TRANSPORT_MAGIC
);
xp
.
deliver
=
VED_Deliver
;
...
...
@@ -171,8 +172,11 @@ ved_include(struct req *preq, const char *src, const char *host)
preq
->
vcl
=
req
->
vcl
;
req
->
vcl
=
NULL
;
preq
->
crc
=
req
->
crc
;
preq
->
l_crc
=
req
->
l_crc
;
if
(
ecx
->
isgzip
&&
req
->
l_crc
)
{
preq
->
crc
=
crc32_combine
(
preq
->
crc
,
req
->
crc
,
req
->
l_crc
);
preq
->
l_crc
+=
req
->
l_crc
;
}
req
->
wrk
=
NULL
;
...
...
@@ -323,7 +327,7 @@ VDP_ESI(struct req *req, enum vdp_action act, void **priv,
}
Debug
(
"INCL [%s][%s] BEGIN
\n
"
,
q
,
ecx
->
p
);
ved_include
(
req
,
(
const
char
*
)
q
,
(
const
char
*
)
ecx
->
p
);
(
const
char
*
)
q
,
(
const
char
*
)
ecx
->
p
,
ecx
);
Debug
(
"INCL [%s][%s] END
\n
"
,
q
,
ecx
->
p
);
ecx
->
p
=
r
+
1
;
break
;
...
...
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