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
6f28d44b
Commit
6f28d44b
authored
Jul 23, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call nghttp2_session_handle_invalid_connection if stream_id == 0 or != 0 case
parent
57401bfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
lib/nghttp2_session.c
lib/nghttp2_session.c
+12
-6
No files found.
lib/nghttp2_session.c
View file @
6f28d44b
...
...
@@ -1480,7 +1480,8 @@ int nghttp2_session_on_syn_stream_received(nghttp2_session *session,
int
r
=
0
;
nghttp2_error_code
error_code
=
NGHTTP2_NO_ERROR
;
if
(
frame
->
hd
.
stream_id
==
0
)
{
return
nghttp2_session_fail_session
(
session
,
NGHTTP2_PROTOCOL_ERROR
);
return
nghttp2_session_handle_invalid_connection
(
session
,
frame
,
NGHTTP2_PROTOCOL_ERROR
);
}
if
(
session
->
goaway_flags
)
{
/* We don't accept new stream after GOAWAY is sent or received. */
...
...
@@ -1529,7 +1530,8 @@ int nghttp2_session_on_syn_reply_received(nghttp2_session *session,
int
valid
=
0
;
nghttp2_error_code
error_code
=
NGHTTP2_PROTOCOL_ERROR
;
if
(
frame
->
hd
.
stream_id
==
0
)
{
return
nghttp2_session_fail_session
(
session
,
NGHTTP2_PROTOCOL_ERROR
);
return
nghttp2_session_handle_invalid_connection
(
session
,
frame
,
NGHTTP2_PROTOCOL_ERROR
);
}
if
((
stream
->
shut_flags
&
NGHTTP2_SHUT_RD
)
==
0
)
{
if
(
nghttp2_session_is_my_stream_id
(
session
,
frame
->
hd
.
stream_id
))
{
...
...
@@ -1570,7 +1572,8 @@ int nghttp2_session_on_headers_received(nghttp2_session *session,
int
valid
=
0
;
nghttp2_error_code
error_code
=
NGHTTP2_PROTOCOL_ERROR
;
if
(
frame
->
hd
.
stream_id
==
0
)
{
return
nghttp2_session_fail_session
(
session
,
NGHTTP2_PROTOCOL_ERROR
);
return
nghttp2_session_handle_invalid_connection
(
session
,
frame
,
NGHTTP2_PROTOCOL_ERROR
);
}
if
((
stream
->
shut_flags
&
NGHTTP2_SHUT_RD
)
==
0
)
{
if
(
nghttp2_session_is_my_stream_id
(
session
,
frame
->
hd
.
stream_id
))
{
...
...
@@ -1643,7 +1646,8 @@ int nghttp2_session_on_rst_stream_received(nghttp2_session *session,
nghttp2_frame
*
frame
)
{
if
(
frame
->
hd
.
stream_id
==
0
)
{
return
nghttp2_session_fail_session
(
session
,
NGHTTP2_PROTOCOL_ERROR
);
return
nghttp2_session_handle_invalid_connection
(
session
,
frame
,
NGHTTP2_PROTOCOL_ERROR
);
}
nghttp2_session_call_on_frame_received
(
session
,
frame
);
nghttp2_session_close_stream
(
session
,
frame
->
hd
.
stream_id
,
...
...
@@ -1759,7 +1763,8 @@ int nghttp2_session_on_settings_received(nghttp2_session *session,
size_t
i
;
int
check
[
NGHTTP2_SETTINGS_MAX
+
1
];
if
(
frame
->
hd
.
stream_id
!=
0
)
{
return
nghttp2_session_fail_session
(
session
,
NGHTTP2_PROTOCOL_ERROR
);
return
nghttp2_session_handle_invalid_connection
(
session
,
frame
,
NGHTTP2_PROTOCOL_ERROR
);
}
/* Check ID/value pairs and persist them if necessary. */
memset
(
check
,
0
,
sizeof
(
check
));
...
...
@@ -1813,7 +1818,8 @@ int nghttp2_session_on_ping_received(nghttp2_session *session,
{
int
r
=
0
;
if
(
frame
->
hd
.
stream_id
!=
0
)
{
return
nghttp2_session_fail_session
(
session
,
NGHTTP2_PROTOCOL_ERROR
);
return
nghttp2_session_handle_invalid_connection
(
session
,
frame
,
NGHTTP2_PROTOCOL_ERROR
);
}
if
((
frame
->
hd
.
flags
&
NGHTTP2_FLAG_PONG
)
==
0
)
{
/* Peer sent ping, so ping it back */
...
...
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