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
f3862b47
Commit
f3862b47
authored
Sep 12, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start keeping track of H2 state
parent
ef399466
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
cache_http2.h
bin/varnishd/http2/cache_http2.h
+4
-0
cache_http2_proto.c
bin/varnishd/http2/cache_http2_proto.c
+5
-1
No files found.
bin/varnishd/http2/cache_http2.h
View file @
f3862b47
...
...
@@ -32,17 +32,20 @@ struct h2_sess;
#include "hpack/vhp.h"
enum
h2_error_e
{
H2E__DUMMY
=
-
1
,
#define H2_ERROR(NAME, val, desc) \
H2E_##NAME = val,
#include "tbl/h2_error.h"
};
enum
h2_frame_e
{
H2_FRAME__DUMMY
=
-
1
,
#define H2_FRAME(l,u,t,f) H2_FRAME_##u = t,
#include "tbl/h2_frames.h"
};
enum
h2_stream_e
{
H2_STREAM__DUMMY
=
-
1
,
#define H2_STREAM(U,s,d) H2_S_##U,
#include "tbl/h2_stream.h"
};
...
...
@@ -51,6 +54,7 @@ enum h2_stream_e {
#include "tbl/h2_frames.h"
enum
h2setting
{
H2_SETTINGS__DUMMY
=
-
1
,
#define H2_SETTINGS(n,v,d) H2S_##n = v,
#include "tbl/h2_settings.h"
#undef H2_SETTINGS
...
...
bin/varnishd/http2/cache_http2_proto.c
View file @
f3862b47
...
...
@@ -188,6 +188,7 @@ h2_new_req(const struct worker *wrk, struct h2_sess *h2,
r2
=
WS_Alloc
(
req
->
ws
,
sizeof
*
r2
);
AN
(
r2
);
INIT_OBJ
(
r2
,
H2_REQ_MAGIC
);
r2
->
state
=
H2_S_IDLE
;
r2
->
h2sess
=
h2
;
r2
->
stream
=
stream
;
r2
->
req
=
req
;
...
...
@@ -384,6 +385,7 @@ h2_do_req(struct worker *wrk, void *priv)
assert
(
CNT_Request
(
wrk
,
req
)
!=
REQ_FSM_DISEMBARK
);
VSL
(
SLT_Debug
,
0
,
"H2REQ CNT done"
);
/* XXX clean up req */
r2
->
state
=
H2_S_CLOSED
;
h2_del_req
(
wrk
,
r2
,
H2E_NO_ERROR
);
}
...
...
@@ -400,7 +402,9 @@ h2_rx_headers(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
* read frames and proper error handling.
*/
assert
(
h2
->
rxf_stream
&
1
);
xxxassert
(
h2
->
rxf_stream
&
1
);
xxxassert
(
r2
->
state
==
H2_S_IDLE
);
r2
->
state
=
H2_S_OPEN
;
req
=
r2
->
req
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
...
...
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