|
|
@ -381,6 +381,27 @@ static grpc_error *update_incoming_window(grpc_exec_ctx *exec_ctx, |
|
|
|
s->incoming_window_delta + |
|
|
|
s->incoming_window_delta + |
|
|
|
t->settings[GRPC_ACKED_SETTINGS] |
|
|
|
t->settings[GRPC_ACKED_SETTINGS] |
|
|
|
[GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]) { |
|
|
|
[GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]) { |
|
|
|
|
|
|
|
if (incoming_frame_size <= |
|
|
|
|
|
|
|
s->incoming_window_delta + |
|
|
|
|
|
|
|
t->settings[GRPC_SENT_SETTINGS] |
|
|
|
|
|
|
|
[GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]) { |
|
|
|
|
|
|
|
gpr_log( |
|
|
|
|
|
|
|
GPR_ERROR, |
|
|
|
|
|
|
|
"Incoming frame of size %d exceeds incoming window size of %" PRId64 |
|
|
|
|
|
|
|
".\n" |
|
|
|
|
|
|
|
"The (un-acked, future) window size would be %" PRId64 |
|
|
|
|
|
|
|
" which is not exceeded.\n" |
|
|
|
|
|
|
|
"This would usually cause a disconnection, but allowing it due to " |
|
|
|
|
|
|
|
"broken HTTP2 implementations in the wild.\n" |
|
|
|
|
|
|
|
"See (for example) https://github.com/netty/netty/issues/6520.", |
|
|
|
|
|
|
|
t->incoming_frame_size, |
|
|
|
|
|
|
|
s->incoming_window_delta + |
|
|
|
|
|
|
|
t->settings[GRPC_ACKED_SETTINGS] |
|
|
|
|
|
|
|
[GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE], |
|
|
|
|
|
|
|
s->incoming_window_delta + |
|
|
|
|
|
|
|
t->settings[GRPC_SENT_SETTINGS] |
|
|
|
|
|
|
|
[GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]); |
|
|
|
|
|
|
|
} else { |
|
|
|
char *msg; |
|
|
|
char *msg; |
|
|
|
gpr_asprintf(&msg, |
|
|
|
gpr_asprintf(&msg, |
|
|
|
"frame of size %d overflows incoming window of %" PRId64, |
|
|
|
"frame of size %d overflows incoming window of %" PRId64, |
|
|
@ -392,6 +413,7 @@ static grpc_error *update_incoming_window(grpc_exec_ctx *exec_ctx, |
|
|
|
gpr_free(msg); |
|
|
|
gpr_free(msg); |
|
|
|
return err; |
|
|
|
return err; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
GRPC_CHTTP2_FLOW_DEBIT_STREAM_INCOMING_WINDOW_DELTA("parse", t, s, |
|
|
|
GRPC_CHTTP2_FLOW_DEBIT_STREAM_INCOMING_WINDOW_DELTA("parse", t, s, |
|
|
|
incoming_frame_size); |
|
|
|
incoming_frame_size); |
|
|
|