Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
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
unique-xids
Commits
349269f1
Commit
349269f1
authored
May 02, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Centralize obj->gzipped setting and get it right up front.
Edging closer to streap+gunzip
parent
4b9d3f43
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
+12
-11
cache.h
bin/varnishd/cache.h
+1
-2
cache_center.c
bin/varnishd/cache_center.c
+11
-3
cache_esi_fetch.c
bin/varnishd/cache_esi_fetch.c
+0
-3
cache_gzip.c
bin/varnishd/cache_gzip.c
+0
-3
No files found.
bin/varnishd/cache.h
View file @
349269f1
...
...
@@ -264,12 +264,11 @@ struct stream_ctx {
unsigned
magic
;
#define STREAM_CTX_MAGIC 0x8213728b
#if 0
struct
vgz
*
vgz
;
void
*
obuf
;
ssize_t
obuf_len
;
ssize_t
obuf_ptr
;
#endif
/* Next byte we will take from storage */
ssize_t
stream_next
;
...
...
bin/varnishd/cache_center.c
View file @
349269f1
...
...
@@ -414,6 +414,7 @@ cnt_error(struct sess *sp)
EXP_Clr
(
&
w
->
exp
);
sp
->
obj
=
STV_NewObject
(
sp
,
NULL
,
1024
,
&
w
->
exp
,
params
->
http_max_hdr
);
XXXAN
(
sp
->
obj
);
sp
->
obj
->
xid
=
sp
->
xid
;
sp
->
obj
->
entered
=
sp
->
t_req
;
}
else
{
...
...
@@ -754,8 +755,8 @@ cnt_fetchbody(struct sess *sp)
sp
->
wrk
->
storage_hint
=
NULL
;
/* VFP will update as needed */
sp
->
obj
->
gziped
=
sp
->
wrk
->
is_gzip
;
if
(
sp
->
wrk
->
do_gzip
||
(
sp
->
wrk
->
is_gzip
&&
!
sp
->
wrk
->
do_gunzip
))
sp
->
obj
->
gziped
=
1
;
if
(
vary
!=
NULL
)
{
sp
->
obj
->
vary
=
...
...
@@ -840,13 +841,20 @@ cnt_streambody(struct sess *sp)
{
int
i
;
struct
stream_ctx
sctx
;
uint8_t
obuf
[
sp
->
wrk
->
res_mode
&
RES_GUNZIP
?
params
->
gzip_stack_buffer
:
1
];
memset
(
&
sctx
,
0
,
sizeof
sctx
);
sctx
.
magic
=
STREAM_CTX_MAGIC
;
AZ
(
sp
->
wrk
->
sctx
);
sp
->
wrk
->
sctx
=
&
sctx
;
if
(
sp
->
wrk
->
res_mode
&
RES_GUNZIP
)
{
sctx
.
vgz
=
VGZ_NewUngzip
(
sp
,
"U S -"
);
sctx
.
obuf
=
obuf
;
sctx
.
obuf_len
=
sizeof
(
obuf
);
}
RES_StreamStart
(
sp
);
/* Use unmodified headers*/
...
...
bin/varnishd/cache_esi_fetch.c
View file @
349269f1
...
...
@@ -386,10 +386,7 @@ vfp_esi_end(struct sess *sp)
VGZ_UpdateObj
(
vef
->
vgz
,
sp
->
obj
);
VGZ_Destroy
(
&
vef
->
vgz
);
XXXAZ
(
vef
->
error
);
sp
->
obj
->
gziped
=
1
;
FREE_OBJ
(
vef
);
}
else
{
sp
->
obj
->
gziped
=
0
;
}
return
(
0
);
}
...
...
bin/varnishd/cache_gzip.c
View file @
349269f1
...
...
@@ -491,7 +491,6 @@ vfp_gunzip_end(struct sess *sp)
sp
->
wrk
->
vgz_rx
=
NULL
;
CHECK_OBJ_NOTNULL
(
vg
,
VGZ_MAGIC
);
VGZ_Destroy
(
&
vg
);
sp
->
obj
->
gziped
=
0
;
return
(
0
);
}
...
...
@@ -572,7 +571,6 @@ vfp_gzip_end(struct sess *sp)
}
while
(
i
!=
Z_STREAM_END
);
VGZ_UpdateObj
(
vg
,
sp
->
obj
);
VGZ_Destroy
(
&
vg
);
sp
->
obj
->
gziped
=
1
;
return
(
0
);
}
...
...
@@ -653,7 +651,6 @@ vfp_testgzip_end(struct sess *sp)
CHECK_OBJ_NOTNULL
(
vg
,
VGZ_MAGIC
);
VGZ_UpdateObj
(
vg
,
sp
->
obj
);
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