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
11fc2672
Commit
11fc2672
authored
Oct 15, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of the trivial/single-file res_mode flags
parent
7bf932f3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
18 deletions
+11
-18
cache.h
bin/varnishd/cache/cache.h
+0
-5
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+0
-1
cache_gzip.c
bin/varnishd/cache/cache_gzip.c
+0
-1
cache_http1_deliver.c
bin/varnishd/http1/cache_http1_deliver.c
+11
-11
No files found.
bin/varnishd/cache/cache.h
View file @
11fc2672
...
...
@@ -515,12 +515,7 @@ struct req {
/* Delivery mode */
unsigned
res_mode
;
#define RES_LEN (1<<1)
#define RES_EOF (1<<2)
#define RES_CHUNKED (1<<3)
#define RES_ESI (1<<4)
#define RES_ESI_CHILD (1<<5)
#define RES_GUNZIP (1<<6)
#define RES_PIPE (1<<7)
/* Transaction VSL buffer */
...
...
bin/varnishd/cache/cache_esi_deliver.c
View file @
11fc2672
...
...
@@ -831,7 +831,6 @@ ved_deliver(struct req *req, struct boc *boc, int wantbody)
if
(
boc
==
NULL
&&
ObjGetLen
(
req
->
wrk
,
req
->
objcore
)
==
0
)
return
;
req
->
res_mode
|=
RES_ESI_CHILD
;
i
=
ObjCheckFlag
(
req
->
wrk
,
req
->
objcore
,
OF_GZIPED
);
if
(
ecx
->
isgzip
&&
i
&&
!
(
req
->
res_mode
&
RES_ESI
))
{
ved_stripgzip
(
req
,
boc
);
...
...
bin/varnishd/cache/cache_gzip.c
View file @
11fc2672
...
...
@@ -299,7 +299,6 @@ vdp_gunzip_init(struct req *req, void **priv)
return
(
-
1
);
}
req
->
res_mode
|=
RES_GUNZIP
;
VGZ_Obuf
(
vg
,
vg
->
m_buf
,
vg
->
m_sz
);
*
priv
=
vg
;
...
...
bin/varnishd/http1/cache_http1_deliver.c
View file @
11fc2672
...
...
@@ -84,7 +84,7 @@ v1d_error(struct req *req, const char *msg)
void
v_matchproto_
(
vtr_deliver_f
)
V1D_Deliver
(
struct
req
*
req
,
struct
boc
*
boc
,
int
sendbody
)
{
int
err
=
0
;
int
err
=
0
,
chunked
=
0
;
unsigned
u
;
uint64_t
hdrbytes
,
bytes
;
...
...
@@ -103,14 +103,14 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody)
http_SetHeader
(
req
->
resp
,
"Connection: keep-alive"
);
if
(
sendbody
)
{
if
(
http_GetHdr
(
req
->
resp
,
H_Content_Length
,
NULL
))
req
->
res_mode
|=
RES_LEN
;
else
if
(
req
->
http
->
protover
==
11
)
{
req
->
res_mode
|=
RES_CHUNKED
;
http_SetHeader
(
req
->
resp
,
"Transfer-Encoding: chunked"
);
}
else
{
req
->
res_mode
|=
RES
_EOF
;
req
->
doclose
=
SC_TX_EOF
;
if
(
!
http_GetHdr
(
req
->
resp
,
H_Content_Length
,
NULL
))
{
if
(
req
->
http
->
protover
==
11
)
{
chunked
=
1
;
http_SetHeader
(
req
->
resp
,
"Transfer-Encoding: chunked"
);
}
else
{
req
->
doclose
=
SC_TX
_EOF
;
}
}
if
(
VDP_Push
(
req
,
&
v1d_vdp
,
NULL
))
{
v1d_error
(
req
,
"workspace_thread overflow"
);
...
...
@@ -144,10 +144,10 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody)
if
(
sendbody
)
{
if
(
DO_DEBUG
(
DBG_FLUSH_HEAD
))
(
void
)
V1L_Flush
(
req
->
wrk
);
if
(
req
->
res_mode
&
RES_CHUNKED
)
if
(
chunked
)
V1L_Chunked
(
req
->
wrk
);
err
=
VDP_DeliverObj
(
req
);
if
(
!
err
&&
(
req
->
res_mode
&
RES_CHUNKED
)
)
if
(
!
err
&&
chunked
)
V1L_EndChunk
(
req
->
wrk
);
}
...
...
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