Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
b6067980
Commit
b6067980
authored
Mar 05, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filter supported flags in received frame
parent
547d6d1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
lib/nghttp2_session.c
lib/nghttp2_session.c
+17
-0
No files found.
lib/nghttp2_session.c
View file @
b6067980
...
...
@@ -3606,6 +3606,10 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
switch
(
iframe
->
frame
.
hd
.
type
)
{
case
NGHTTP2_DATA
:
{
DEBUGF
(
fprintf
(
stderr
,
"DATA
\n
"
));
iframe
->
frame
.
hd
.
flags
&=
(
NGHTTP2_FLAG_END_STREAM
|
NGHTTP2_FLAG_END_SEGMENT
|
NGHTTP2_FLAG_PAD_LOW
|
NGHTTP2_FLAG_PAD_HIGH
);
/* Check stream is open. If it is not open or closing,
ignore payload. */
busy
=
1
;
...
...
@@ -3637,6 +3641,12 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
break
;
}
case
NGHTTP2_HEADERS
:
iframe
->
frame
.
hd
.
flags
&=
(
NGHTTP2_FLAG_END_STREAM
|
NGHTTP2_FLAG_END_SEGMENT
|
NGHTTP2_FLAG_END_HEADERS
|
NGHTTP2_FLAG_PRIORITY
|
NGHTTP2_FLAG_PAD_LOW
|
NGHTTP2_FLAG_PAD_HIGH
);
DEBUGF
(
fprintf
(
stderr
,
"HEADERS
\n
"
));
rv
=
inbound_frame_handle_pad
(
iframe
,
&
iframe
->
frame
.
hd
);
if
(
rv
<
0
)
{
...
...
@@ -3690,6 +3700,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
break
;
}
#endif
/* DEBUGBUILD */
iframe
->
frame
.
hd
.
flags
=
NGHTTP2_FLAG_NONE
;
if
(
iframe
->
payloadleft
!=
4
)
{
busy
=
1
;
iframe
->
state
=
NGHTTP2_IB_FRAME_SIZE_ERROR
;
...
...
@@ -3700,6 +3711,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
break
;
case
NGHTTP2_SETTINGS
:
DEBUGF
(
fprintf
(
stderr
,
"SETTINGS
\n
"
));
iframe
->
frame
.
hd
.
flags
&=
NGHTTP2_FLAG_ACK
;
if
((
iframe
->
frame
.
hd
.
length
%
NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH
)
||
((
iframe
->
frame
.
hd
.
flags
&
NGHTTP2_FLAG_ACK
)
&&
iframe
->
payloadleft
>
0
))
{
...
...
@@ -3718,6 +3730,9 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
break
;
case
NGHTTP2_PUSH_PROMISE
:
DEBUGF
(
fprintf
(
stderr
,
"PUSH_PROMISE
\n
"
));
iframe
->
frame
.
hd
.
flags
&=
(
NGHTTP2_FLAG_END_HEADERS
|
NGHTTP2_FLAG_PAD_LOW
|
NGHTTP2_FLAG_PAD_HIGH
);
rv
=
inbound_frame_handle_pad
(
iframe
,
&
iframe
->
frame
.
hd
);
if
(
rv
<
0
)
{
busy
=
1
;
...
...
@@ -3743,6 +3758,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
break
;
case
NGHTTP2_PING
:
DEBUGF
(
fprintf
(
stderr
,
"PING
\n
"
));
iframe
->
frame
.
hd
.
flags
&=
NGHTTP2_FLAG_ACK
;
if
(
iframe
->
payloadleft
!=
8
)
{
busy
=
1
;
iframe
->
state
=
NGHTTP2_IB_FRAME_SIZE_ERROR
;
...
...
@@ -3753,6 +3769,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
break
;
case
NGHTTP2_GOAWAY
:
DEBUGF
(
fprintf
(
stderr
,
"GOAWAY
\n
"
));
iframe
->
frame
.
hd
.
flags
=
NGHTTP2_FLAG_NONE
;
if
(
iframe
->
payloadleft
<
8
)
{
busy
=
1
;
iframe
->
state
=
NGHTTP2_IB_FRAME_SIZE_ERROR
;
...
...
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