Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent3
Commits
79cfb9cb
Commit
79cfb9cb
authored
Jan 22, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark objects with a "gziped" bit if they are.
parent
181a0496
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
2 deletions
+10
-2
cache.h
bin/varnishd/cache.h
+2
-0
cache_center.c
bin/varnishd/cache_center.c
+2
-2
cache_esi_fetch.c
bin/varnishd/cache_esi_fetch.c
+4
-0
cache_gzip.c
bin/varnishd/cache_gzip.c
+2
-0
No files found.
bin/varnishd/cache.h
View file @
79cfb9cb
...
...
@@ -430,7 +430,9 @@ struct object {
double
ban_t
;
unsigned
response
;
/* XXX: make bitmap */
unsigned
cacheable
;
unsigned
gziped
;
ssize_t
len
;
...
...
bin/varnishd/cache_center.c
View file @
79cfb9cb
...
...
@@ -179,8 +179,7 @@ cnt_deliver(struct sess *sp)
sp
->
wrk
->
res_mode
|=
RES_ESI_CHILD
;
}
if
(
params
->
http_gzip_support
&&
http_HdrIs
(
sp
->
obj
->
http
,
H_Content_Encoding
,
"gzip"
)
&&
if
(
params
->
http_gzip_support
&&
sp
->
obj
->
gziped
&&
!
RFC2616_Req_Gzip
(
sp
))
{
/*
* We don't know what it uncompresses to
...
...
@@ -662,6 +661,7 @@ cnt_fetch(struct sess *sp)
CHECK_OBJ_NOTNULL
(
sp
->
obj
,
OBJECT_MAGIC
);
sp
->
wrk
->
storage_hint
=
NULL
;
sp
->
obj
->
gziped
=
sp
->
wrk
->
is_gzip
;
if
(
vary
!=
NULL
)
{
sp
->
obj
->
vary
=
...
...
bin/varnishd/cache_esi_fetch.c
View file @
79cfb9cb
...
...
@@ -269,6 +269,7 @@ vfp_esi_bytes_gg(struct sess *sp, struct http_conn *htc, size_t bytes)
do
{
VGZ_Obuf
(
sp
->
wrk
->
vgz_rx
,
ibuf2
,
sizeof
ibuf2
);
i
=
VGZ_Gunzip
(
sp
->
wrk
->
vgz_rx
,
&
dp
,
&
dl
);
/* XXX: check i */
vef
->
bufp
=
ibuf2
;
if
(
dl
>
0
)
VEP_parse
(
sp
,
ibuf2
,
dl
);
...
...
@@ -373,6 +374,9 @@ vfp_esi_end(struct sess *sp)
sp
->
wrk
->
vef_priv
=
NULL
;
CHECK_OBJ_NOTNULL
(
vef
,
VEF_MAGIC
);
XXXAZ
(
vef
->
error
);
sp
->
obj
->
gziped
=
1
;
}
else
{
sp
->
obj
->
gziped
=
0
;
}
return
(
0
);
}
...
...
bin/varnishd/cache_gzip.c
View file @
79cfb9cb
...
...
@@ -383,6 +383,7 @@ vfp_gunzip_end(struct sess *sp)
vg
=
sp
->
wrk
->
vgz_rx
;
CHECK_OBJ_NOTNULL
(
vg
,
VGZ_MAGIC
);
VGZ_Destroy
(
&
vg
);
sp
->
obj
->
gziped
=
0
;
return
(
0
);
}
...
...
@@ -458,6 +459,7 @@ vfp_gzip_end(struct sess *sp)
sp
->
obj
->
len
+=
dl
;
}
while
(
i
!=
Z_STREAM_END
);
VGZ_Destroy
(
&
vg
);
sp
->
obj
->
gziped
=
1
;
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