summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/http2/http2protocol_p.h3
-rw-r--r--src/network/access/qhttp2protocolhandler.cpp10
2 files changed, 3 insertions, 10 deletions
diff --git a/src/network/access/http2/http2protocol_p.h b/src/network/access/http2/http2protocol_p.h
index b0af5aa919..ed5f2bf561 100644
--- a/src/network/access/http2/http2protocol_p.h
+++ b/src/network/access/http2/http2protocol_p.h
@@ -133,9 +133,6 @@ enum Http2PredefinedParameters
maxPayloadSize = (1 << 24) - 1, // HTTP/2 6.5.2
defaultSessionWindowSize = 65535, // HTTP/2 6.5.2
- // Using 1000 (rather arbitrarily), just to
- // impose *some* upper limit:
- maxPeerConcurrentStreams = 1000,
maxConcurrentStreams = 100 // HTTP/2, 6.5.2
};
diff --git a/src/network/access/qhttp2protocolhandler.cpp b/src/network/access/qhttp2protocolhandler.cpp
index 3b28775466..83b131f74d 100644
--- a/src/network/access/qhttp2protocolhandler.cpp
+++ b/src/network/access/qhttp2protocolhandler.cpp
@@ -393,7 +393,8 @@ bool QHttp2ProtocolHandler::sendRequest()
initReplyFromPushPromise(message, key);
}
- const auto streamsToUse = std::min<quint32>(maxConcurrentStreams - activeStreams.size(),
+ const auto streamsToUse = std::min<quint32>(maxConcurrentStreams > activeStreams.size()
+ ? maxConcurrentStreams - activeStreams.size() : 0,
requests.size());
auto it = requests.begin();
for (quint32 i = 0; i < streamsToUse; ++i) {
@@ -1085,13 +1086,8 @@ bool QHttp2ProtocolHandler::acceptSetting(Http2::Settings identifier, quint32 ne
QMetaObject::invokeMethod(this, "resumeSuspendedStreams", Qt::QueuedConnection);
}
- if (identifier == Settings::MAX_CONCURRENT_STREAMS_ID) {
- if (newValue > maxPeerConcurrentStreams) {
- connectionError(PROTOCOL_ERROR, "SETTINGS invalid number of concurrent streams");
- return false;
- }
+ if (identifier == Settings::MAX_CONCURRENT_STREAMS_ID)
maxConcurrentStreams = newValue;
- }
if (identifier == Settings::MAX_FRAME_SIZE_ID) {
if (newValue < Http2::minPayloadLimit || newValue > Http2::maxPayloadSize) {