mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 18:48:54 +08:00
nghttpx: Accept incoming bytes at least initial window size
This commit is contained in:
@@ -284,8 +284,13 @@ void on_data_chunk_recv_callback(nghttp2_session *session,
|
|||||||
}
|
}
|
||||||
if(upstream->get_flow_control()) {
|
if(upstream->get_flow_control()) {
|
||||||
downstream->inc_recv_window_size(len);
|
downstream->inc_recv_window_size(len);
|
||||||
|
// In case that user specified initial window size is smaller
|
||||||
|
// than default one and avoid stream tear down for the first
|
||||||
|
// request due to race condition, we allow at least default
|
||||||
|
// initial window size.
|
||||||
if(downstream->get_recv_window_size() >
|
if(downstream->get_recv_window_size() >
|
||||||
upstream->get_initial_window_size()) {
|
std::max(NGHTTP2_INITIAL_WINDOW_SIZE,
|
||||||
|
upstream->get_initial_window_size())) {
|
||||||
if(LOG_ENABLED(INFO)) {
|
if(LOG_ENABLED(INFO)) {
|
||||||
ULOG(INFO, upstream) << "Flow control error: recv_window_size="
|
ULOG(INFO, upstream) << "Flow control error: recv_window_size="
|
||||||
<< downstream->get_recv_window_size()
|
<< downstream->get_recv_window_size()
|
||||||
|
|||||||
@@ -906,7 +906,9 @@ void on_data_chunk_recv_callback(nghttp2_session *session,
|
|||||||
|
|
||||||
if(spdy->get_flow_control()) {
|
if(spdy->get_flow_control()) {
|
||||||
sd->dconn->inc_recv_window_size(len);
|
sd->dconn->inc_recv_window_size(len);
|
||||||
if(sd->dconn->get_recv_window_size() > spdy->get_initial_window_size()) {
|
if(sd->dconn->get_recv_window_size() >
|
||||||
|
std::max(NGHTTP2_INITIAL_WINDOW_SIZE,
|
||||||
|
spdy->get_initial_window_size())) {
|
||||||
if(LOG_ENABLED(INFO)) {
|
if(LOG_ENABLED(INFO)) {
|
||||||
SSLOG(INFO, spdy) << "Flow control error: recv_window_size="
|
SSLOG(INFO, spdy) << "Flow control error: recv_window_size="
|
||||||
<< sd->dconn->get_recv_window_size()
|
<< sd->dconn->get_recv_window_size()
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ void on_data_chunk_recv_callback(spdylay_session *session,
|
|||||||
if(upstream->get_flow_control()) {
|
if(upstream->get_flow_control()) {
|
||||||
downstream->inc_recv_window_size(len);
|
downstream->inc_recv_window_size(len);
|
||||||
if(downstream->get_recv_window_size() >
|
if(downstream->get_recv_window_size() >
|
||||||
upstream->get_initial_window_size()) {
|
std::max(65536, upstream->get_initial_window_size())) {
|
||||||
if(LOG_ENABLED(INFO)) {
|
if(LOG_ENABLED(INFO)) {
|
||||||
ULOG(INFO, upstream) << "Flow control error: recv_window_size="
|
ULOG(INFO, upstream) << "Flow control error: recv_window_size="
|
||||||
<< downstream->get_recv_window_size()
|
<< downstream->get_recv_window_size()
|
||||||
|
|||||||
Reference in New Issue
Block a user