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
e9571472
Commit
e9571472
authored
Dec 20, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make obvious implementation error connection error
parent
010726a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
lib/nghttp2_session.c
lib/nghttp2_session.c
+14
-7
No files found.
lib/nghttp2_session.c
View file @
e9571472
...
@@ -3509,9 +3509,11 @@ int nghttp2_session_on_response_headers_received(nghttp2_session *session,
...
@@ -3509,9 +3509,11 @@ int nghttp2_session_on_response_headers_received(nghttp2_session *session,
If an endpoint receives additional frames for a stream that is
If an endpoint receives additional frames for a stream that is
in this state it MUST respond with a stream error (Section
in this state it MUST respond with a stream error (Section
5.4.2) of type STREAM_CLOSED.
5.4.2) of type STREAM_CLOSED.
We go further, and make it connection error.
*/
*/
return
session_inflate_handle_invalid_
stream
(
session
,
frame
,
return
session_inflate_handle_invalid_
connection
(
NGHTTP2_ERR_STREAM_CLOSED
);
session
,
frame
,
NGHTTP2_ERR_STREAM_CLOSED
,
"HEADERS: stream closed"
);
}
}
stream
->
state
=
NGHTTP2_STREAM_OPENED
;
stream
->
state
=
NGHTTP2_STREAM_OPENED
;
rv
=
session_call_on_begin_headers
(
session
,
frame
);
rv
=
session_call_on_begin_headers
(
session
,
frame
);
...
@@ -3582,9 +3584,11 @@ int nghttp2_session_on_headers_received(nghttp2_session *session,
...
@@ -3582,9 +3584,11 @@ int nghttp2_session_on_headers_received(nghttp2_session *session,
If an endpoint receives additional frames for a stream that is
If an endpoint receives additional frames for a stream that is
in this state it MUST respond with a stream error (Section
in this state it MUST respond with a stream error (Section
5.4.2) of type STREAM_CLOSED.
5.4.2) of type STREAM_CLOSED.
we go further, and make it connection error.
*/
*/
return
session_inflate_handle_invalid_
stream
(
session
,
frame
,
return
session_inflate_handle_invalid_
connection
(
NGHTTP2_ERR_STREAM_CLOSED
);
session
,
frame
,
NGHTTP2_ERR_STREAM_CLOSED
,
"HEADERS: stream closed"
);
}
}
if
(
nghttp2_session_is_my_stream_id
(
session
,
frame
->
hd
.
stream_id
))
{
if
(
nghttp2_session_is_my_stream_id
(
session
,
frame
->
hd
.
stream_id
))
{
if
(
stream
->
state
==
NGHTTP2_STREAM_OPENED
)
{
if
(
stream
->
state
==
NGHTTP2_STREAM_OPENED
)
{
...
@@ -4304,8 +4308,9 @@ session_on_connection_window_update_received(nghttp2_session *session,
...
@@ -4304,8 +4308,9 @@ session_on_connection_window_update_received(nghttp2_session *session,
nghttp2_frame
*
frame
)
{
nghttp2_frame
*
frame
)
{
/* Handle connection-level flow control */
/* Handle connection-level flow control */
if
(
frame
->
window_update
.
window_size_increment
==
0
)
{
if
(
frame
->
window_update
.
window_size_increment
==
0
)
{
return
session_handle_invalid_connection
(
session
,
frame
,
NGHTTP2_ERR_PROTO
,
return
session_handle_invalid_connection
(
NULL
);
session
,
frame
,
NGHTTP2_ERR_PROTO
,
"WINDOW_UPDATE: window_size_increment == 0"
);
}
}
if
(
NGHTTP2_MAX_WINDOW_SIZE
-
frame
->
window_update
.
window_size_increment
<
if
(
NGHTTP2_MAX_WINDOW_SIZE
-
frame
->
window_update
.
window_size_increment
<
...
@@ -4335,7 +4340,9 @@ static int session_on_stream_window_update_received(nghttp2_session *session,
...
@@ -4335,7 +4340,9 @@ static int session_on_stream_window_update_received(nghttp2_session *session,
session
,
frame
,
NGHTTP2_ERR_PROTO
,
"WINDOW_UPADATE to reserved stream"
);
session
,
frame
,
NGHTTP2_ERR_PROTO
,
"WINDOW_UPADATE to reserved stream"
);
}
}
if
(
frame
->
window_update
.
window_size_increment
==
0
)
{
if
(
frame
->
window_update
.
window_size_increment
==
0
)
{
return
session_handle_invalid_stream
(
session
,
frame
,
NGHTTP2_ERR_PROTO
);
return
session_handle_invalid_connection
(
session
,
frame
,
NGHTTP2_ERR_PROTO
,
"WINDOW_UPDATE: window_size_increment == 0"
);
}
}
if
(
NGHTTP2_MAX_WINDOW_SIZE
-
frame
->
window_update
.
window_size_increment
<
if
(
NGHTTP2_MAX_WINDOW_SIZE
-
frame
->
window_update
.
window_size_increment
<
stream
->
remote_window_size
)
{
stream
->
remote_window_size
)
{
...
...
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