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
2e125484
Commit
2e125484
authored
Oct 31, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give VRB_Iterate() explicit wrk+vsl_log arguments, since it is called
from both client and backend side.
parent
38526b68
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
cache_req_body.c
bin/varnishd/cache/cache_req_body.c
+7
-6
cache_varnishd.h
bin/varnishd/cache/cache_varnishd.h
+2
-1
cache_http1_fetch.c
bin/varnishd/http1/cache_http1_fetch.c
+1
-1
No files found.
bin/varnishd/cache/cache_req_body.c
View file @
2e125484
...
...
@@ -179,7 +179,8 @@ vrb_pull(struct req *req, ssize_t maxsize, objiterate_f *func, void *priv)
*/
ssize_t
VRB_Iterate
(
struct
req
*
req
,
objiterate_f
*
func
,
void
*
priv
)
VRB_Iterate
(
struct
worker
*
wrk
,
struct
vsl_log
*
vsl
,
struct
req
*
req
,
objiterate_f
*
func
,
void
*
priv
)
{
int
i
;
...
...
@@ -189,7 +190,7 @@ VRB_Iterate(struct req *req, objiterate_f *func, void *priv)
switch
(
req
->
req_body_status
)
{
case
REQ_BODY_CACHED
:
AN
(
req
->
body_oc
);
if
(
ObjIterate
(
req
->
wrk
,
req
->
body_oc
,
priv
,
func
,
0
))
if
(
ObjIterate
(
wrk
,
req
->
body_oc
,
priv
,
func
,
0
))
return
(
-
1
);
return
(
0
);
case
REQ_BODY_NONE
:
...
...
@@ -198,11 +199,11 @@ VRB_Iterate(struct req *req, objiterate_f *func, void *priv)
case
REQ_BODY_WITHOUT_LEN
:
break
;
case
REQ_BODY_TAKEN
:
VSLb
(
req
->
vsl
,
SLT_VCL_Error
,
VSLb
(
vsl
,
SLT_VCL_Error
,
"Uncached req.body can only be consumed once."
);
return
(
-
1
);
case
REQ_BODY_FAIL
:
VSLb
(
req
->
vsl
,
SLT_FetchError
,
VSLb
(
vsl
,
SLT_FetchError
,
"Had failed reading req.body before."
);
return
(
-
1
);
default:
...
...
@@ -217,7 +218,7 @@ VRB_Iterate(struct req *req, objiterate_f *func, void *priv)
i
=
-
1
;
Lck_Unlock
(
&
req
->
sp
->
mtx
);
if
(
i
)
{
VSLb
(
req
->
vsl
,
SLT_VCL_Error
,
VSLb
(
vsl
,
SLT_VCL_Error
,
"Multiple attempts to access non-cached req.body"
);
return
(
i
);
}
...
...
@@ -253,7 +254,7 @@ VRB_Ignore(struct req *req)
return
(
0
);
if
(
req
->
req_body_status
==
REQ_BODY_WITH_LEN
||
req
->
req_body_status
==
REQ_BODY_WITHOUT_LEN
)
(
void
)
VRB_Iterate
(
req
,
httpq_req_body_discard
,
NULL
);
(
void
)
VRB_Iterate
(
req
->
wrk
,
req
->
vsl
,
req
,
httpq_req_body_discard
,
NULL
);
return
(
0
);
}
...
...
bin/varnishd/cache/cache_varnishd.h
View file @
2e125484
...
...
@@ -355,7 +355,8 @@ void Req_AcctLogCharge(struct VSC_main_wrk *, struct req *);
/* cache_req_body.c */
int
VRB_Ignore
(
struct
req
*
);
ssize_t
VRB_Cache
(
struct
req
*
,
ssize_t
maxsize
);
ssize_t
VRB_Iterate
(
struct
req
*
,
objiterate_f
*
func
,
void
*
priv
);
ssize_t
VRB_Iterate
(
struct
worker
*
,
struct
vsl_log
*
,
struct
req
*
,
objiterate_f
*
func
,
void
*
priv
);
void
VRB_Free
(
struct
req
*
);
/* cache_req_fsm.c [CNT] */
...
...
bin/varnishd/http1/cache_http1_fetch.c
View file @
2e125484
...
...
@@ -108,7 +108,7 @@ V1F_SendReq(struct worker *wrk, struct busyobj *bo, uint64_t *ctr_hdrbytes,
(
bo
->
req
->
req_body_status
==
REQ_BODY_CACHED
||
!
onlycached
))
{
if
(
do_chunked
)
V1L_Chunked
(
wrk
);
i
=
VRB_Iterate
(
bo
->
req
,
vbf_iter_req_body
,
bo
);
i
=
VRB_Iterate
(
wrk
,
bo
->
vsl
,
bo
->
req
,
vbf_iter_req_body
,
bo
);
if
(
bo
->
req
->
req_body_status
==
REQ_BODY_FAIL
)
{
/*
...
...
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