[neon/qt/qtbase/Neon/release] debian: Backport upstream patch to remove limit on the number of HTTP/2 streams.
Dmitry Shachnev
null at kde.org
Thu Jul 14 13:14:45 BST 2022
Git commit da8a4bfc0e25395012e03f20fc3a5d629769e7a0 by Dmitry Shachnev.
Committed on 01/07/2022 at 19:35.
Pushed by jriddell into branch 'Neon/release'.
Backport upstream patch to remove limit on the number of HTTP/2 streams.
Closes: #1014112.
M +3 -0 debian/changelog
A +50 -0 debian/patches/remove_limit_on_number_of_streams.diff
M +1 -0 debian/patches/series
https://invent.kde.org/neon/qt/qtbase/commit/da8a4bfc0e25395012e03f20fc3a5d629769e7a0
diff --git a/debian/changelog b/debian/changelog
index 69906ac..72096d2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
qtbase-opensource-src (5.15.4+dfsg-4) UNRELEASED; urgency=medium
+ [ Dmitry Shachnev ]
+ * Backport upstream patch to remove limit on the number of HTTP/2 streams
+ (closes: #1014112).
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Fri, 01 Jul 2022 22:12:26 +0300
diff --git a/debian/patches/remove_limit_on_number_of_streams.diff b/debian/patches/remove_limit_on_number_of_streams.diff
new file mode 100644
index 0000000..0f7fe3e
--- /dev/null
+++ b/debian/patches/remove_limit_on_number_of_streams.diff
@@ -0,0 +1,50 @@
+Description: H2: remove a rather useless limit on the number of streams
+ SETTINGS for max concurrect number of streams is 'one direction' - this
+ is how our peer conveys the possible number of streams _we_ can open,
+ not _them_. If they choose to have it unlimited - let it be so.
+ .
+ It's possible to send 0 as maximum number, also, it's possible to
+ reduce the maximum compared to initial at some point - then I have
+ to avoid integer overflows.
+Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=46940ca73791e87e
+Last-Update: 2022-06-20
+
+--- 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
+ };
+
+--- 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) {
+@@ -1078,13 +1079,8 @@ bool QHttp2ProtocolHandler::acceptSettin
+ 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) {
diff --git a/debian/patches/series b/debian/patches/series
index 9d2fc3a..4951636 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,6 +13,7 @@ CVE-2021-38593.diff
openssl3.diff
CVE-2022-25255.diff
moc_handle_include.diff
+remove_limit_on_number_of_streams.diff
# Debian specific.
gnukfreebsd.diff
More information about the Neon-commits
mailing list