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
d56e94a0
Commit
d56e94a0
authored
Jan 17, 2018
by
Dag Haavi Finstad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h2: Move RST_STREAM tx handling to its own function
parent
f319a348
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
cache_http2_proto.c
bin/varnishd/http2/cache_http2_proto.c
+24
-12
No files found.
bin/varnishd/http2/cache_http2_proto.c
View file @
d56e94a0
...
...
@@ -803,13 +803,35 @@ h2_frame_complete(struct http_conn *htc)
/**********************************************************************/
static
h2_error
h2_tx_rst
(
struct
worker
*
wrk
,
struct
h2_sess
*
h2
,
h2_error
h2e
)
{
h2_error
ret
;
char
b
[
4
];
CHECK_OBJ_NOTNULL
(
h2
,
H2_SESS_MAGIC
);
Lck_Lock
(
&
h2
->
sess
->
mtx
);
VSLb
(
h2
->
vsl
,
SLT_Debug
,
"H2: stream %u: %s"
,
h2
->
rxf_stream
,
h2e
->
txt
);
Lck_Unlock
(
&
h2
->
sess
->
mtx
);
vbe32enc
(
b
,
h2e
->
val
);
H2_Send_Get
(
wrk
,
h2
,
h2
->
req0
);
ret
=
H2_Send_Frame
(
wrk
,
h2
,
H2_F_RST_STREAM
,
0
,
sizeof
b
,
h2
->
rxf_stream
,
b
);
H2_Send_Rel
(
h2
,
h2
->
req0
);
return
(
ret
);
}
/**********************************************************************/
static
h2_error
h2_procframe
(
struct
worker
*
wrk
,
struct
h2_sess
*
h2
,
h2_frame
h2f
)
{
struct
h2_req
*
r2
=
NULL
,
*
r22
;
h2_error
h2e
;
char
b
[
4
];
ASSERT_RXTHR
(
h2
);
if
(
h2
->
rxf_stream
==
0
&&
h2f
->
act_szero
!=
0
)
...
...
@@ -857,17 +879,7 @@ h2_procframe(struct worker *wrk, struct h2_sess *h2,
if
(
h2
->
rxf_stream
==
0
||
h2e
->
connection
)
return
(
h2e
);
// Connection errors one level up
Lck_Lock
(
&
h2
->
sess
->
mtx
);
VSLb
(
h2
->
vsl
,
SLT_Debug
,
"H2: stream %u: %s"
,
h2
->
rxf_stream
,
h2e
->
txt
);
Lck_Unlock
(
&
h2
->
sess
->
mtx
);
vbe32enc
(
b
,
h2e
->
val
);
H2_Send_Get
(
wrk
,
h2
,
h2
->
req0
);
(
void
)
H2_Send_Frame
(
wrk
,
h2
,
H2_F_RST_STREAM
,
0
,
sizeof
b
,
h2
->
rxf_stream
,
b
);
H2_Send_Rel
(
h2
,
h2
->
req0
);
return
(
0
);
return
(
h2_tx_rst
(
wrk
,
h2
,
h2e
));
}
/***********************************************************************
...
...
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