BugID:17646749:[http2] fix download data limit to 64k issue
@@ -298,6 +298,12 @@ static int on_data_chunk_recv_callback(nghttp2_session *session,
connection->cbs->on_user_chunk_recv_cb(stream_id, data, len, flags);
}
+ nghttp2_session_consume_connection(session, len);
+ nghttp2_session_consume(session, stream_id, len);
+ nghttp2_submit_window_update(session, NGHTTP2_FLAG_NONE, 0, len);
+ nghttp2_submit_window_update(session, NGHTTP2_FLAG_NONE, stream_id, len);
+ nghttp2_session_send(session);
+
return 0;
}
@@ -649,6 +655,7 @@ http2_connection_t *iotx_http2_client_connect_with_cb(void *pclient, char *url,
connection->cbs = cb;
setup_nghttp2_callbacks(callbacks);
+
rv = nghttp2_session_client_new((nghttp2_session **)&connection->session, callbacks, connection);
if (rv != 0) {
NGHTTP2_DBG("nghttp2_session_client_new3 %d", rv);
