Use NGHTTP2_PROTOCOL_ERROR for WINDOW_UPDATE with increments == 0
This commit is contained in:
parent
dce20c3e6a
commit
f705b2aec4
|
@ -3951,8 +3951,12 @@ static int
|
|||
session_on_connection_window_update_received(nghttp2_session *session,
|
||||
nghttp2_frame *frame) {
|
||||
/* Handle connection-level flow control */
|
||||
if (frame->window_update.window_size_increment == 0 ||
|
||||
NGHTTP2_MAX_WINDOW_SIZE - frame->window_update.window_size_increment <
|
||||
if (frame->window_update.window_size_increment == 0) {
|
||||
return session_handle_invalid_connection(session, frame,
|
||||
NGHTTP2_PROTOCOL_ERROR, NULL);
|
||||
}
|
||||
|
||||
if (NGHTTP2_MAX_WINDOW_SIZE - frame->window_update.window_size_increment <
|
||||
session->remote_window_size) {
|
||||
return session_handle_invalid_connection(session, frame,
|
||||
NGHTTP2_FLOW_CONTROL_ERROR, NULL);
|
||||
|
@ -3980,8 +3984,11 @@ static int session_on_stream_window_update_received(nghttp2_session *session,
|
|||
session, frame, NGHTTP2_PROTOCOL_ERROR,
|
||||
"WINDOW_UPADATE to reserved stream");
|
||||
}
|
||||
if (frame->window_update.window_size_increment == 0 ||
|
||||
NGHTTP2_MAX_WINDOW_SIZE - frame->window_update.window_size_increment <
|
||||
if (frame->window_update.window_size_increment == 0) {
|
||||
return session_handle_invalid_stream(session, frame,
|
||||
NGHTTP2_PROTOCOL_ERROR);
|
||||
}
|
||||
if (NGHTTP2_MAX_WINDOW_SIZE - frame->window_update.window_size_increment <
|
||||
stream->remote_window_size) {
|
||||
return session_handle_invalid_stream(session, frame,
|
||||
NGHTTP2_FLOW_CONTROL_ERROR);
|
||||
|
|
Loading…
Reference in New Issue