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
233b3928
Commit
233b3928
authored
Sep 03, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push busyobj out of V1F fetching
parent
e6e95699
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
17 deletions
+12
-17
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+1
-1
cache_http1_fetch.c
bin/varnishd/cache/cache_http1_fetch.c
+10
-15
No files found.
bin/varnishd/cache/cache.h
View file @
233b3928
...
...
@@ -809,7 +809,7 @@ void VBO_waitstate(struct busyobj *bo, enum busyobj_state_e want);
/* cache_http1_fetch.c [V1F] */
int
V1F_fetch_hdr
(
struct
worker
*
wrk
,
struct
busyobj
*
bo
,
struct
req
*
req
);
void
V1F_Setup_Fetch
(
struct
busyobj
*
bo
);
void
V1F_Setup_Fetch
(
struct
vfp_ctx
*
vfc
,
ssize_t
cl
,
struct
http_conn
*
htc
);
/* cache_http1_fsm.c [HTTP1] */
typedef
int
(
req_body_iter_f
)(
struct
req
*
,
void
*
priv
,
void
*
ptr
,
size_t
);
...
...
bin/varnishd/cache/cache_fetch.c
View file @
233b3928
...
...
@@ -556,7 +556,7 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
ObjSetFlag
(
bo
->
vfc
,
OF_IMSCAND
,
1
);
if
(
bo
->
htc
.
body_status
!=
BS_NONE
)
V1F_Setup_Fetch
(
bo
);
V1F_Setup_Fetch
(
bo
->
vfc
,
bo
->
content_length
,
&
bo
->
htc
);
/*
* Ready to fetch the body
...
...
bin/varnishd/cache/cache_http1_fetch.c
View file @
233b3928
...
...
@@ -153,39 +153,34 @@ static const struct vfp v1f_eof = {
*/
void
V1F_Setup_Fetch
(
struct
busyobj
*
bo
)
V1F_Setup_Fetch
(
struct
vfp_ctx
*
vfc
,
ssize_t
cl
,
struct
http_conn
*
htc
)
{
struct
http_conn
*
htc
;
struct
vfp_entry
*
vfe
;
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
htc
=
&
bo
->
htc
;
CHECK_OBJ_NOTNULL
(
vfc
,
VFP_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
htc
,
HTTP_CONN_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
->
vbc
,
VBC_MAGIC
);
switch
(
htc
->
body_status
)
{
case
BS_EOF
:
assert
(
bo
->
content_length
==
-
1
);
vfe
=
VFP_Push
(
bo
->
vfc
,
&
v1f_eof
,
0
);
vfe
->
priv1
=
&
bo
->
htc
;
assert
(
cl
==
-
1
);
vfe
=
VFP_Push
(
vfc
,
&
v1f_eof
,
0
);
vfe
->
priv2
=
0
;
break
;
case
BS_LENGTH
:
assert
(
bo
->
content_length
>
0
);
vfe
=
VFP_Push
(
bo
->
vfc
,
&
v1f_straight
,
0
);
vfe
->
priv1
=
&
bo
->
htc
;
vfe
->
priv2
=
bo
->
content_length
;
assert
(
cl
>
0
);
vfe
=
VFP_Push
(
vfc
,
&
v1f_straight
,
0
);
vfe
->
priv2
=
cl
;
break
;
case
BS_CHUNKED
:
assert
(
bo
->
content_length
==
-
1
);
vfe
=
VFP_Push
(
bo
->
vfc
,
&
v1f_chunked
,
0
);
vfe
->
priv1
=
&
bo
->
htc
;
assert
(
cl
==
-
1
);
vfe
=
VFP_Push
(
vfc
,
&
v1f_chunked
,
0
);
vfe
->
priv2
=
-
1
;
break
;
default:
WRONG
(
"Wrong body_status"
);
break
;
}
vfe
->
priv1
=
htc
;
return
;
}
...
...
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