diff options
author | Timur Pocheptsov <[email protected]> | 2022-08-29 13:02:58 +0200 |
---|---|---|
committer | Timur Pocheptsov <[email protected]> | 2022-08-30 20:20:38 +0200 |
commit | 9540a4eb9071a17446c6b68e086bbea2b50d50f5 (patch) | |
tree | cdd74ca5acdb29706b2234b6c01a933f60a9d75a /src/network/access/qnetworkrequest.cpp | |
parent | fbcf910831ef7ba4897d7e818dc0c1c3e45e28a6 (diff) |
QHttp2Configuration: in QNAM, use old, higher values in flow control
Initially, stream receive window's size was quite significant.
At some point when dealing with a server that did not want
our windows' sizes and was closing the connection (they only
accept 64K) we reduced this size, which ended in a regression
with download speed significantly throttled. We return the old
values (or even more, presuming we have 10 multiplexed streams
and not 100). And also making QNAM consistent with its documentation
(it was not updated).
[ChangeLog][QtNetwork] Stream receive window that HTTP/2 protocol in QNAM is using
increased to 214748364 octets (from the previous 64K) not to throttle download
speed. Clients, working with servers, not accepting such parameters,
must set HTTP/2 configuration on their requests accordingly.
Fixes: QTBUG-105043
Pick-to: 6.4 6.3 6.2
Change-Id: I252b6b5eefe92a7304dad15c67928d5a57d9597f
Reviewed-by: MÃ¥rten Nordheim <[email protected]>
Diffstat (limited to 'src/network/access/qnetworkrequest.cpp')
-rw-r--r-- | src/network/access/qnetworkrequest.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index 07eaf2f484e..9edbd1ff105 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -481,10 +481,9 @@ QNetworkRequest::QNetworkRequest() // Initial values proposed by RFC 7540 are quite draconian, but we // know about servers configured with this value as maximum possible, // rejecting our SETTINGS frame and sending us a GOAWAY frame with the - // flow control error set. Unless an application sets its own parameters, - // we don't send SETTINGS_INITIAL_WINDOW_SIZE, but increase - // (via WINDOW_UPDATE) the session window size. These are our 'defaults': - d->h2Configuration.setStreamReceiveWindowSize(Http2::defaultSessionWindowSize); + // flow control error set. If this causes a problem - the app should + // set a proper configuration. We'll use our defaults, as documented. + d->h2Configuration.setStreamReceiveWindowSize(Http2::qtDefaultStreamReceiveWindowSize); d->h2Configuration.setSessionReceiveWindowSize(Http2::maxSessionReceiveWindowSize); d->h2Configuration.setServerPushEnabled(false); #endif // QT_CONFIG(http) @@ -859,7 +858,7 @@ void QNetworkRequest::setPeerVerifyName(const QString &peerName) \list \li Window size for connection-level flowcontrol is 2147483647 octets - \li Window size for stream-level flowcontrol is 21474836 octets + \li Window size for stream-level flowcontrol is 214748364 octets \li Max frame size is 16384 \endlist |