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
650f63c7
Commit
650f63c7
authored
Dec 15, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fail session on the reception of DATA in closed stream or illegal state
parent
4e0ca71e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
lib/nghttp2_session.c
lib/nghttp2_session.c
+16
-4
No files found.
lib/nghttp2_session.c
View file @
650f63c7
...
...
@@ -2988,8 +2988,14 @@ int nghttp2_session_on_data_received(nghttp2_session *session,
5.4.2) of type STREAM_CLOSED.
*/
if
(
stream
->
state
!=
NGHTTP2_STREAM_CLOSING
)
{
return
nghttp2_session_add_rst_stream
(
session
,
stream_id
,
NGHTTP2_STREAM_CLOSED
);
/* return nghttp2_session_add_rst_stream(session, stream_id, */
/* NGHTTP2_STREAM_CLOSED); */
/* The spec says this is stream error situation, but if the peer
is broken, it may send lots of DATA frames and we will send
RST_STREAM for each of them, which is bad. So we just close
the connection here. */
return
nghttp2_session_fail_session
(
session
,
NGHTTP2_PROTOCOL_ERROR
);
}
return
0
;
}
...
...
@@ -3002,8 +3008,14 @@ int nghttp2_session_on_data_received(nghttp2_session *session,
}
}
}
else
if
(
stream
->
state
!=
NGHTTP2_STREAM_CLOSING
)
{
return
nghttp2_session_add_rst_stream
(
session
,
stream_id
,
NGHTTP2_PROTOCOL_ERROR
);
/* return nghttp2_session_add_rst_stream(session, stream_id, */
/* NGHTTP2_PROTOCOL_ERROR); */
/* This situation may be handled as stream error, but if the
peer is broken, it may send lots of DATA frames and we will
send RST_STREAM for each of them, which is bad. So we just
close the connection here. */
return
nghttp2_session_fail_session
(
session
,
NGHTTP2_PROTOCOL_ERROR
);
}
}
else
if
(
stream
->
state
!=
NGHTTP2_STREAM_CLOSING
)
{
/* It is OK if this is remote peer initiated stream and we did
...
...
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