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
d647799c
Commit
d647799c
authored
Jan 20, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Take int account received data length to check flow control error
parent
594e1caa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
lib/nghttp2_session.c
lib/nghttp2_session.c
+5
-4
No files found.
lib/nghttp2_session.c
View file @
d647799c
...
@@ -3307,9 +3307,10 @@ static int nghttp2_session_process_data_frame(nghttp2_session *session)
...
@@ -3307,9 +3307,10 @@ static int nghttp2_session_process_data_frame(nghttp2_session *session)
/*
/*
* Now we have SETTINGS synchronization, flow control error can be
* Now we have SETTINGS synchronization, flow control error can be
* detected strictly. If DATA frame is received with length > 0 and
* detected strictly. If DATA frame is received with length > 0 and
* current received window size is equal to or larger than local
* current received window size + delta length is strictly larger than
* window size (latter happens when we shirnk window size), it is
* local window size, it is subject to FLOW_CONTROL_ERROR, so return
* subject to FLOW_CONTROL_ERROR, so return -1. If the resulting
* -1. Note that local_window_size is calculated after SETTINGS ACK is
* received from peer, so peer must honor this limit. If the resulting
* recv_window_size is strictly larger than NGHTTP2_MAX_WINDOW_SIZE,
* recv_window_size is strictly larger than NGHTTP2_MAX_WINDOW_SIZE,
* return -1 too.
* return -1 too.
*/
*/
...
@@ -3317,7 +3318,7 @@ static int adjust_recv_window_size(int32_t *recv_window_size_ptr,
...
@@ -3317,7 +3318,7 @@ static int adjust_recv_window_size(int32_t *recv_window_size_ptr,
int32_t
delta
,
int32_t
delta
,
int32_t
local_window_size
)
int32_t
local_window_size
)
{
{
if
(
*
recv_window_size_ptr
>
=
local_window_size
||
if
(
*
recv_window_size_ptr
>
local_window_size
-
delta
||
*
recv_window_size_ptr
>
NGHTTP2_MAX_WINDOW_SIZE
-
delta
)
{
*
recv_window_size_ptr
>
NGHTTP2_MAX_WINDOW_SIZE
-
delta
)
{
return
-
1
;
return
-
1
;
}
}
...
...
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