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
255b99a9
Commit
255b99a9
authored
Mar 12, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a new Req State to handle Expect & Connection, use it for H2.
parent
8f3ce041
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
26 deletions
+17
-26
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+12
-0
cache_http2.h
bin/varnishd/http2/cache_http2.h
+1
-0
cache_http2_proto.c
bin/varnishd/http2/cache_http2_proto.c
+3
-4
cache_http2_session.c
bin/varnishd/http2/cache_http2_session.c
+0
-22
steps.h
include/tbl/steps.h
+1
-0
No files found.
bin/varnishd/cache/cache_req_fsm.c
View file @
255b99a9
...
...
@@ -94,6 +94,17 @@ CNT_GotReq(struct worker *wrk, struct req *req)
return
(
0
);
}
static
enum
req_fsm_nxt
cnt_transport
(
struct
worker
*
wrk
,
struct
req
*
req
)
{
if
(
CNT_GotReq
(
wrk
,
req
))
return
(
REQ_FSM_DONE
);
req
->
req_step
=
R_STP_RECV
;
return
(
REQ_FSM_MORE
);
}
/*--------------------------------------------------------------------
* Deliver an object to client
*/
...
...
@@ -961,6 +972,7 @@ CNT_Request(struct worker *wrk, struct req *req)
*/
assert
(
req
->
req_step
==
R_STP_LOOKUP
||
req
->
req_step
==
R_STP_TRANSPORT
||
req
->
req_step
==
R_STP_RECV
);
AN
(
req
->
vsl
->
wid
&
VSL_CLIENTMARKER
);
...
...
bin/varnishd/http2/cache_http2.h
View file @
255b99a9
...
...
@@ -220,3 +220,4 @@ void h2_del_req(struct worker *, struct h2_req *);
int
h2_rxframe
(
struct
worker
*
,
struct
h2_sess
*
);
h2_error
h2_set_setting
(
struct
h2_sess
*
,
const
uint8_t
*
);
void
h2_req_body
(
struct
req
*
);
task_func_t
h2_do_req
;
bin/varnishd/http2/cache_http2_proto.c
View file @
255b99a9
...
...
@@ -427,7 +427,7 @@ h2_rx_settings(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
* Incoming HEADERS, this is where the partys at...
*/
static
void
__match_proto__
(
task_func_t
)
void
__match_proto__
(
task_func_t
)
h2_do_req
(
struct
worker
*
wrk
,
void
*
priv
)
{
struct
req
*
req
;
...
...
@@ -436,8 +436,8 @@ h2_do_req(struct worker *wrk, void *priv)
CAST_OBJ_NOTNULL
(
req
,
priv
,
REQ_MAGIC
);
CAST_OBJ_NOTNULL
(
r2
,
req
->
transport_priv
,
H2_REQ_MAGIC
);
THR_SetRequest
(
req
);
if
(
!
CNT_GotReq
(
wrk
,
req
))
assert
(
CNT_Request
(
wrk
,
req
)
!=
REQ_FSM_DISEMBARK
);
req
->
req_step
=
R_STP_TRANSPORT
;
assert
(
CNT_Request
(
wrk
,
req
)
!=
REQ_FSM_DISEMBARK
);
THR_SetRequest
(
NULL
);
VSL
(
SLT_Debug
,
0
,
"H2REQ CNT done"
);
/* XXX clean up req */
...
...
@@ -491,7 +491,6 @@ h2_rx_headers(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
h2
->
new_req
=
req
;
req
->
sp
=
h2
->
sess
;
req
->
req_step
=
R_STP_RECV
;
req
->
transport
=
&
H2_transport
;
req
->
t_first
=
VTIM_real
();
...
...
bin/varnishd/http2/cache_http2_session.c
View file @
255b99a9
...
...
@@ -115,28 +115,6 @@ h2_new_sess(const struct worker *wrk, struct sess *sp, struct req *srq)
return
(
h2
);
}
/**********************************************************************
* Incoming HEADERS, this is where the partys at...
*/
static
void
__match_proto__
(
task_func_t
)
h2_do_req
(
struct
worker
*
wrk
,
void
*
priv
)
{
struct
req
*
req
;
struct
h2_req
*
r2
;
CAST_OBJ_NOTNULL
(
req
,
priv
,
REQ_MAGIC
);
CAST_OBJ_NOTNULL
(
r2
,
req
->
transport_priv
,
H2_REQ_MAGIC
);
THR_SetRequest
(
req
);
if
(
!
CNT_GotReq
(
wrk
,
req
))
assert
(
CNT_Request
(
wrk
,
req
)
!=
REQ_FSM_DISEMBARK
);
THR_SetRequest
(
NULL
);
VSL
(
SLT_Debug
,
0
,
"H2REQ CNT done"
);
/* XXX clean up req */
r2
->
state
=
H2_S_CLOSED
;
h2_del_req
(
wrk
,
r2
);
}
/**********************************************************************/
enum
htc_status_e
__match_proto__
(
htc_complete_f
)
...
...
include/tbl/steps.h
View file @
255b99a9
...
...
@@ -31,6 +31,7 @@
/*lint -save -e525 -e539 */
#ifdef REQ_STEP
REQ_STEP
(
transport
,
TRANSPORT
,
(
wrk
,
req
))
REQ_STEP
(
restart
,
RESTART
,
(
wrk
,
req
))
REQ_STEP
(
recv
,
RECV
,
(
wrk
,
req
))
REQ_STEP
(
pipe
,
PIPE
,
(
wrk
,
req
))
...
...
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