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
c6ec0b49
Commit
c6ec0b49
authored
Sep 26, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove vfp->priv2, it's surplus to requirements.
parent
02a8578d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
14 deletions
+5
-14
cache_filter.h
bin/varnishd/cache/cache_filter.h
+0
-2
cache_gzip.c
bin/varnishd/cache/cache_gzip.c
+5
-12
No files found.
bin/varnishd/cache/cache_filter.h
View file @
c6ec0b49
...
...
@@ -27,7 +27,6 @@
*
*/
struct
busyobj
;
struct
req
;
struct
vfp_entry
;
struct
vfp_ctx
;
...
...
@@ -52,7 +51,6 @@ struct vfp {
vfp_pull_f
*
pull
;
vfp_fini_f
*
fini
;
const
void
*
priv1
;
intptr_t
priv2
;
};
struct
vfp_entry
{
...
...
bin/varnishd/cache/cache_gzip.c
View file @
c6ec0b49
...
...
@@ -437,10 +437,6 @@ VGZ_Destroy(struct vgz **vgp)
/*--------------------------------------------------------------------*/
#define VFP_GUNZIP 0
#define VFP_GZIP 1
#define VFP_TESTGUNZIP 2
static
enum
vfp_status
__match_proto__
(
vfp_init_f
)
vfp_gzip_init
(
struct
vfp_ctx
*
vc
,
struct
vfp_entry
*
vfe
)
{
...
...
@@ -454,14 +450,14 @@ vfp_gzip_init(struct vfp_ctx *vc, struct vfp_entry *vfe)
return
(
VFP_NULL
);
}
if
(
vfe
->
vfp
->
priv2
==
VFP_GZIP
)
{
if
(
vfe
->
vfp
==
&
VFP_gzip
)
{
if
(
http_GetHdr
(
vc
->
http
,
H_Content_Encoding
,
NULL
))
return
(
VFP_NULL
);
vg
=
VGZ_NewGzip
(
vc
->
wrk
->
vsl
,
vfe
->
vfp
->
priv1
);
}
else
{
if
(
!
http_HdrIs
(
vc
->
http
,
H_Content_Encoding
,
"gzip"
))
return
(
VFP_NULL
);
if
(
vfe
->
vfp
->
priv2
==
VFP_GUNZIP
)
if
(
vfe
->
vfp
==
&
VFP_gunzip
)
vg
=
VGZ_NewGunzip
(
vc
->
wrk
->
vsl
,
vfe
->
vfp
->
priv1
);
else
vg
=
VGZ_NewTestGunzip
(
vc
->
wrk
->
vsl
,
vfe
->
vfp
->
priv1
);
...
...
@@ -474,16 +470,16 @@ vfp_gzip_init(struct vfp_ctx *vc, struct vfp_entry *vfe)
VGZ_Ibuf
(
vg
,
vg
->
m_buf
,
0
);
AZ
(
vg
->
m_len
);
if
(
vfe
->
vfp
->
priv2
==
VFP_GUNZIP
||
vfe
->
vfp
->
priv2
==
VFP_GZIP
)
{
if
(
vfe
->
vfp
==
&
VFP_gunzip
||
vfe
->
vfp
==
&
VFP_gzip
)
{
http_Unset
(
vc
->
http
,
H_Content_Encoding
);
http_Unset
(
vc
->
http
,
H_Content_Length
);
RFC2616_Weaken_Etag
(
vc
->
http
);
}
if
(
vfe
->
vfp
->
priv2
==
VFP_GZIP
)
if
(
vfe
->
vfp
==
&
VFP_gzip
)
http_SetHeader
(
vc
->
http
,
"Content-Encoding: gzip"
);
if
(
vfe
->
vfp
->
priv2
==
VFP_GZIP
||
vfe
->
vfp
->
priv2
==
VFP_TESTGUNZIP
)
if
(
vfe
->
vfp
==
&
VFP_gzip
||
vfe
->
vfp
==
&
VFP_testgunzip
)
RFC2616_Vary_AE
(
vc
->
http
);
return
(
VFP_OK
);
...
...
@@ -670,7 +666,6 @@ const struct vfp VFP_gunzip = {
.
pull
=
vfp_gunzip_pull
,
.
fini
=
vfp_gzip_fini
,
.
priv1
=
"U F -"
,
.
priv2
=
VFP_GUNZIP
,
};
const
struct
vfp
VFP_gzip
=
{
...
...
@@ -679,7 +674,6 @@ const struct vfp VFP_gzip = {
.
pull
=
vfp_gzip_pull
,
.
fini
=
vfp_gzip_fini
,
.
priv1
=
"G F -"
,
.
priv2
=
VFP_GZIP
,
};
const
struct
vfp
VFP_testgunzip
=
{
...
...
@@ -688,5 +682,4 @@ const struct vfp VFP_testgunzip = {
.
pull
=
vfp_testgunzip_pull
,
.
fini
=
vfp_gzip_fini
,
.
priv1
=
"u F -"
,
.
priv2
=
VFP_TESTGUNZIP
,
};
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