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
3bd29b4d
Commit
3bd29b4d
authored
May 14, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Be much more cautions about create C-L headers from OA_GZIPBITS
parent
de914862
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
cache_gzip.c
bin/varnishd/cache/cache_gzip.c
+17
-13
No files found.
bin/varnishd/cache/cache_gzip.c
View file @
3bd29b4d
...
...
@@ -293,20 +293,24 @@ VDP_gunzip(struct req *req, enum vdp_action act, void **priv,
VGZ_Obuf
(
vg
,
vg
->
m_buf
,
vg
->
m_sz
);
*
priv
=
vg
;
p
=
ObjGetattr
(
req
->
wrk
,
req
->
objcore
,
OA_GZIPBITS
,
&
dl
);
if
(
p
!=
NULL
&&
dl
==
32
)
{
u
=
vbe64dec
(
p
+
24
);
/*
* If the size is non-zero, and we are the top
* VDP, we know what size the output will be.
*/
if
(
u
!=
0
&&
VTAILQ_FIRST
(
&
req
->
vdp
)
->
func
==
VDP_gunzip
)
req
->
resp_len
=
u
;
else
req
->
resp_len
=
-
1
;
}
http_Unset
(
req
->
resp
,
H_Content_Encoding
);
req
->
resp_len
=
-
1
;
if
(
req
->
objcore
->
busyobj
!=
NULL
)
return
(
0
);
/* Incomplete, no idea about length */
p
=
ObjGetattr
(
req
->
wrk
,
req
->
objcore
,
OA_GZIPBITS
,
&
dl
);
if
(
p
==
NULL
||
dl
!=
32
)
return
(
0
);
/* No OA_GZIPBITS yet */
u
=
vbe64dec
(
p
+
24
);
/*
* If the size is non-zero AND we are the top
* VDP (ie: no ESI), we know what size the output will be.
*/
if
(
u
!=
0
&&
VTAILQ_FIRST
(
&
req
->
vdp
)
->
func
==
VDP_gunzip
)
req
->
resp_len
=
u
;
return
(
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