diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2021-10-11 14:30:29 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2021-10-12 14:08:08 +0200 |
commit | 0e58b3db346c70babf10ffa8c813452cda65626c (patch) | |
tree | 8c43f19f72513e9acfb6de64f79de4fbe1db6e9b /src/network/access/qnetworkrequest.cpp | |
parent | b8360981791f876d835d3c3efcb1c6821e421b81 (diff) |
Don't send the default SETTINGS_INITIAL_WINDOW_SIZE
And don't set non-default large value in QNetworkRequest's constructor.
Some servers consider those values as 'flow control error'.
Pick-to: 6.2
Fixes: QTBUG-97384
Change-Id: I801b7c83fe7e7392a02ba653c36dfa8a22c21d1e
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/access/qnetworkrequest.cpp')
-rw-r--r-- | src/network/access/qnetworkrequest.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index 688c29935c..3e9c12ae9e 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -492,13 +492,14 @@ public: QNetworkRequest::QNetworkRequest() : d(new QNetworkRequestPrivate) { - #if QT_CONFIG(http) - // Initial values proposed by RFC 7540 are quite draconian, - // so unless an application will set its own parameters, we - // make stream window size larger and increase (via WINDOW_UPDATE) - // the session window size. These are our 'defaults': - d->h2Configuration.setStreamReceiveWindowSize(Http2::qtDefaultStreamReceiveWindowSize); + // 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); d->h2Configuration.setSessionReceiveWindowSize(Http2::maxSessionReceiveWindowSize); d->h2Configuration.setServerPushEnabled(false); #endif // QT_CONFIG(http) |