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
94d1d0fd
Commit
94d1d0fd
authored
Oct 27, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish VDP stack mgt API
parent
69d45413
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
16 deletions
+17
-16
cache_deliver_proc.c
bin/varnishd/cache/cache_deliver_proc.c
+6
-3
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+1
-4
cache_filter.h
bin/varnishd/cache/cache_filter.h
+1
-1
cache_session.c
bin/varnishd/cache/cache_session.c
+3
-0
cache_http1_deliver.c
bin/varnishd/http1/cache_http1_deliver.c
+6
-8
No files found.
bin/varnishd/cache/cache_deliver_proc.c
View file @
94d1d0fd
...
...
@@ -52,7 +52,7 @@ VDP_bytes(struct req *req, enum vdp_action act, const void *ptr, ssize_t len)
}
void
VDP_push
(
struct
req
*
req
,
vdp_bytes
*
func
,
void
*
priv
)
VDP_push
(
struct
req
*
req
,
vdp_bytes
*
func
,
void
*
priv
,
int
bottom
)
{
struct
vdp_entry
*
vdp
;
...
...
@@ -64,8 +64,11 @@ VDP_push(struct req *req, vdp_bytes *func, void *priv)
INIT_OBJ
(
vdp
,
VDP_ENTRY_MAGIC
);
vdp
->
func
=
func
;
vdp
->
priv
=
priv
;
VTAILQ_INSERT_HEAD
(
&
req
->
vdp
,
vdp
,
list
);
req
->
vdp_nxt
=
vdp
;
if
(
bottom
)
VTAILQ_INSERT_TAIL
(
&
req
->
vdp
,
vdp
,
list
);
else
VTAILQ_INSERT_HEAD
(
&
req
->
vdp
,
vdp
,
list
);
req
->
vdp_nxt
=
VTAILQ_FIRST
(
&
req
->
vdp
);
AZ
(
vdp
->
func
(
req
,
VDP_INIT
,
&
vdp
->
priv
,
NULL
,
0
));
}
...
...
bin/varnishd/cache/cache_esi_deliver.c
View file @
94d1d0fd
...
...
@@ -127,10 +127,7 @@ ved_include(struct req *preq, const char *src, const char *host)
req
->
crc
=
preq
->
crc
;
req
->
l_crc
=
preq
->
l_crc
;
req
->
vdp_nxt
=
0
;
VTAILQ_INIT
(
&
req
->
vdp
);
VDP_push
(
req
,
ved_vdp_bytes
,
preq
);
VDP_push
(
req
,
ved_vdp_bytes
,
preq
,
0
);
THR_SetRequest
(
req
);
...
...
bin/varnishd/cache/cache_filter.h
View file @
94d1d0fd
...
...
@@ -106,7 +106,7 @@ struct vdp_entry {
};
int
VDP_bytes
(
struct
req
*
,
enum
vdp_action
act
,
const
void
*
ptr
,
ssize_t
len
);
void
VDP_push
(
struct
req
*
,
vdp_bytes
*
func
,
void
*
priv
);
void
VDP_push
(
struct
req
*
,
vdp_bytes
*
func
,
void
*
priv
,
int
bottom
);
void
VDP_close
(
struct
req
*
req
);
vdp_bytes
VDP_gunzip
;
...
...
bin/varnishd/cache/cache_session.c
View file @
94d1d0fd
...
...
@@ -371,6 +371,9 @@ SES_GetReq(const struct worker *wrk, struct sess *sp)
req
->
t_prev
=
NAN
;
req
->
t_req
=
NAN
;
req
->
vdp_nxt
=
0
;
VTAILQ_INIT
(
&
req
->
vdp
);
return
(
req
);
}
...
...
bin/varnishd/http1/cache_http1_deliver.c
View file @
94d1d0fd
...
...
@@ -185,7 +185,7 @@ v1d_dorange(struct req *req, struct busyobj *bo, const char *r)
v1rp
->
range_off
=
0
;
v1rp
->
range_low
=
low
;
v1rp
->
range_high
=
high
+
1
;
VDP_push
(
req
,
v1d_range_bytes
,
v1rp
);
VDP_push
(
req
,
v1d_range_bytes
,
v1rp
,
0
);
}
/*--------------------------------------------------------------------*/
...
...
@@ -308,10 +308,10 @@ V1D_Deliver(struct req *req, struct busyobj *bo)
}
else
{
if
(
req
->
gzip_resp
&&
!
ObjCheckFlag
(
req
->
wrk
,
req
->
objcore
,
OF_GZIPED
))
VDP_push
(
req
,
VED_pretend_gzip
,
NULL
);
VDP_push
(
req
,
VED_pretend_gzip
,
NULL
,
0
);
else
if
(
!
req
->
gzip_resp
&&
ObjCheckFlag
(
req
->
wrk
,
req
->
objcore
,
OF_GZIPED
))
VDP_push
(
req
,
VDP_gunzip
,
NULL
);
VDP_push
(
req
,
VDP_gunzip
,
NULL
,
0
);
if
(
req
->
res_mode
&
RES_ESI
)
ESI_Deliver
(
req
);
...
...
@@ -335,10 +335,6 @@ V1D_Deliver(struct req *req, struct busyobj *bo)
http_SetHeader
(
req
->
resp
,
req
->
doclose
?
"Connection: close"
:
"Connection: keep-alive"
);
req
->
vdp_nxt
=
0
;
VTAILQ_INIT
(
&
req
->
vdp
);
VDP_push
(
req
,
v1d_bytes
,
NULL
);
if
(
req
->
wantbody
&&
cache_param
->
http_range_support
&&
...
...
@@ -349,7 +345,9 @@ V1D_Deliver(struct req *req, struct busyobj *bo)
}
if
(
req
->
res_mode
&
RES_GUNZIP
)
VDP_push
(
req
,
VDP_gunzip
,
NULL
);
VDP_push
(
req
,
VDP_gunzip
,
NULL
,
0
);
VDP_push
(
req
,
v1d_bytes
,
NULL
,
1
);
V1L_Reserve
(
req
->
wrk
,
req
->
ws
,
&
req
->
sp
->
fd
,
req
->
vsl
,
req
->
t_prev
);
...
...
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