Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qt6-httpserver for openSUSE:Factory checked in at 2025-06-05 20:32:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-httpserver (Old) and /work/SRC/openSUSE:Factory/.qt6-httpserver.new.19631 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-httpserver" Thu Jun 5 20:32:07 2025 rev:22 rq:1282560 version:6.9.1 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-httpserver/qt6-httpserver.changes 2025-04-07 17:36:14.115865165 +0200 +++ /work/SRC/openSUSE:Factory/.qt6-httpserver.new.19631/qt6-httpserver.changes 2025-06-05 20:32:25.524518817 +0200 @@ -1,0 +2,6 @@ +Tue Jun 3 07:49:26 UTC 2025 - Christophe Marin <[email protected]> + +- Update to 6.9.1: + * https://www.qt.io/blog/qt-6.9.1-released + +------------------------------------------------------------------- Old: ---- qthttpserver-everywhere-src-6.9.0.tar.xz New: ---- qthttpserver-everywhere-src-6.9.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-httpserver.spec ++++++ --- /var/tmp/diff_new_pack.ZMTZeQ/_old 2025-06-05 20:32:26.408555575 +0200 +++ /var/tmp/diff_new_pack.ZMTZeQ/_new 2025-06-05 20:32:26.408555575 +0200 @@ -16,7 +16,7 @@ # -%define real_version 6.9.0 +%define real_version 6.9.1 %define short_version 6.9 %define tar_name qthttpserver-everywhere-src %define tar_suffix %{nil} @@ -27,7 +27,7 @@ %endif # Name: qt6-httpserver%{?pkg_suffix} -Version: 6.9.0 +Version: 6.9.1 Release: 0 Summary: Qt HTTP Server License: GPL-3.0-only ++++++ qthttpserver-everywhere-src-6.9.0.tar.xz -> qthttpserver-everywhere-src-6.9.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qthttpserver-everywhere-src-6.9.0/.cmake.conf new/qthttpserver-everywhere-src-6.9.1/.cmake.conf --- old/qthttpserver-everywhere-src-6.9.0/.cmake.conf 2025-03-29 01:31:15.000000000 +0100 +++ new/qthttpserver-everywhere-src-6.9.1/.cmake.conf 2025-05-29 03:02:51.000000000 +0200 @@ -1,4 +1,4 @@ -set(QT_REPO_MODULE_VERSION "6.9.0") +set(QT_REPO_MODULE_VERSION "6.9.1") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1") list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_CONTEXTLESS_CONNECT=1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qthttpserver-everywhere-src-6.9.0/.gitreview new/qthttpserver-everywhere-src-6.9.1/.gitreview --- old/qthttpserver-everywhere-src-6.9.0/.gitreview 1970-01-01 01:00:00.000000000 +0100 +++ new/qthttpserver-everywhere-src-6.9.1/.gitreview 2025-05-29 03:02:51.000000000 +0200 @@ -0,0 +1,4 @@ +[gerrit] +host=codereview.qt-project.org +project=qt/qthttpserver +defaultbranch=dev diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qthttpserver-everywhere-src-6.9.0/.tag new/qthttpserver-everywhere-src-6.9.1/.tag --- old/qthttpserver-everywhere-src-6.9.0/.tag 2025-03-29 01:31:15.000000000 +0100 +++ new/qthttpserver-everywhere-src-6.9.1/.tag 2025-05-29 03:02:51.000000000 +0200 @@ -1 +1 @@ -c51fe1d95f664ae2e174d83ac28115b53957faa8 +4d43e233bce4d94d4c0ccd3410124cb91ea7f43a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qthttpserver-everywhere-src-6.9.0/REUSE.toml new/qthttpserver-everywhere-src-6.9.1/REUSE.toml --- old/qthttpserver-everywhere-src-6.9.0/REUSE.toml 2025-03-29 01:31:15.000000000 +0100 +++ new/qthttpserver-everywhere-src-6.9.1/REUSE.toml 2025-05-29 03:02:51.000000000 +0200 @@ -12,18 +12,18 @@ [[annotations]] path = ["**.pro", "**.qrc", "**CMakeLists.txt", ".cmake.conf", "**.yaml", - "**.cfg", "**BLACKLIST", "**ci_config_linux.json"] + "**.cfg", "**BLACKLIST", "**ci_config_linux.json", ".tag"] precedence = "closest" comment = "build system" SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd." SPDX-License-Identifier = "BSD-3-Clause" [[annotations]] -path = [".tag", "**/.gitattributes", "**.gitignore"] +path = ["**/.gitattributes", "**.gitignore", "**.gitreview"] precedence = "closest" -comment = "version control system. Licensed as build system" +comment = "version control system. Infrastructure" SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd." -SPDX-License-Identifier = "BSD-3-Clause" +SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR BSD-3-Clause" [[annotations]] path = ["examples/**"] @@ -41,10 +41,10 @@ [[annotations]] path = ["**.toml", "licenseRule.json"] -comment = "documentation" +comment = "linfrastructure" precedence = "override" SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd." -SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only" +SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR BSD-3-Clause" [[annotations]] path = ["**/qt_attribution.json"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qthttpserver-everywhere-src-6.9.0/coin/module_config.yaml new/qthttpserver-everywhere-src-6.9.1/coin/module_config.yaml --- old/qthttpserver-everywhere-src-6.9.0/coin/module_config.yaml 2025-03-29 01:31:15.000000000 +0100 +++ new/qthttpserver-everywhere-src-6.9.1/coin/module_config.yaml 2025-05-29 03:02:51.000000000 +0200 @@ -6,7 +6,6 @@ instructions: Build: - # to be turned on when the module source SBOM pass the license check - type: EnvironmentVariable variableName: VERIFY_SOURCE_SBOM variableValue: "ON" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qthttpserver-everywhere-src-6.9.0/dependencies.yaml new/qthttpserver-everywhere-src-6.9.1/dependencies.yaml --- old/qthttpserver-everywhere-src-6.9.0/dependencies.yaml 2025-03-29 01:31:15.000000000 +0100 +++ new/qthttpserver-everywhere-src-6.9.1/dependencies.yaml 2025-05-29 03:02:51.000000000 +0200 @@ -1,7 +1,7 @@ dependencies: ../qtbase: - ref: 25986746947798e1a22d0830d3bcb11a55fcd3ae + ref: 2ad23cd72d5f122f88ce95792a4323d639c27d25 required: true ../qtwebsockets: - ref: 0707110b34e99ae48b61dbd3087f2edfcc940f93 + ref: aed12a0013dffe3e0cd564fb23e83299affda941 required: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qthttpserver-everywhere-src-6.9.0/licenseRule.json new/qthttpserver-everywhere-src-6.9.1/licenseRule.json --- old/qthttpserver-everywhere-src-6.9.0/licenseRule.json 2025-03-29 01:31:15.000000000 +0100 +++ new/qthttpserver-everywhere-src-6.9.1/licenseRule.json 2025-05-29 03:02:51.000000000 +0200 @@ -1,6 +1,6 @@ [ { - "comment" : ["file_pattern_ending: strings matched against the end of a file name.", + "comment": ["file_pattern_ending: strings matched against the end of a file name.", "location keys: regular expression matched against the beginning of", "the file path (relative to the git submodule root).", "spdx: list of SPDX-License-Expression's allowed in the matching files.", @@ -9,83 +9,94 @@ "unless they are examples", "Files with other endings can also be build system files" ], - "file_pattern_ending" : ["CMakeLists.txt", ".cmake", ".pro", ".pri", ".prf", + "file_pattern_ending": ["CMakeLists.txt", ".cmake", ".pro", ".pri", ".prf", "configure", "configure.bat", "cmake.in", "plist.in", "CMakeLists.txt.in", - ".cmake.conf", ".gitattributes", ".gitignore", ".tag", "ci_config_linux.json", + ".cmake.conf", ".tag", "ci_config_linux.json", ".yaml", "BLACKLIST"], - "location" : { - "" : { - "comment" : "Default", - "file type" : "build system", - "spdx" : ["BSD-3-Clause"] - }, - "(.*)(examples/|snippets/)" : { - "comment" : "Example takes precedent", - "file type" : "examples and snippets", - "spdx" : ["LicenseRef-Qt-Commercial OR BSD-3-Clause"] + "location": { + "": { + "comment": "Default", + "file type": "build system", + "spdx": ["BSD-3-Clause"] + }, + "(.*)(examples/|snippets/)": { + "comment": "Example takes precedent", + "file type": "examples and snippets", + "spdx": ["LicenseRef-Qt-Commercial OR BSD-3-Clause"] } } }, { - "comments" : ["Files with the following endings are Tool licensed,", + "comments": ["Files with the following endings are infrastructure licensed"], + "file_pattern_ending": [".gitattributes", ".gitignore", ".gitmodules", ".gitreview", + "_clang-format", "licenseRule.json", "REUSE.toml"], + "location":{ + "": { + "comment": "Default", + "file type": "infrastructure", + "spdx": ["LicenseRef-Qt-Commercial OR BSD-3-Clause"] + } + } + }, + { + "comments": ["Files with the following endings are Tool licensed,", "unless they are examples.", "Files with other endings can also be tool files."], - "file_pattern_ending" : [".sh", ".py", ".pl", ".bat", ".ps1"], - "location" :{ - "" : { - "comment" : "Default", - "file type" : "tools and utils", - "spdx" : ["LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0"] - }, - "(.*)(examples/|snippets/)" : { - "comment" : "Example takes precedent", - "file type" : "examples and snippets", - "spdx" : ["LicenseRef-Qt-Commercial OR BSD-3-Clause"] + "file_pattern_ending": [".sh", ".py", ".pl", ".bat", ".ps1"], + "location":{ + "": { + "comment": "Default", + "file type": "tools and utils", + "spdx": ["LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0"] + }, + "(.*)(examples/|snippets/)": { + "comment": "Example takes precedent", + "file type": "examples and snippets", + "spdx": ["LicenseRef-Qt-Commercial OR BSD-3-Clause"] } } }, { - "comment" : "Files with the following endings are Documentation licensed.", - "file_pattern_ending" : [".qdoc", ".qdocinc" , ".qdocconf", "README", "qt_attribution.json", - "REUSE.toml", "licenseRule.json"], - "location" :{ - "" : { - "comment" : "", - "file type" : "documentation", - "spdx" : ["LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only"] + "comment": "Files with the following endings are Documentation licensed.", + "file_pattern_ending": [".qdoc", ".qdocinc" , ".qdocconf", "README", "qt_attribution.json"], + "location":{ + "": { + "comment": "", + "file type": "documentation", + "spdx": ["LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only"] } } }, { - "comment" : ["All other files", + "comment": ["All other files", "The licensing is defined only by the file location in the Qt module repository.", "NO <file_pattern_ending> key for this case!", "This needs to be the last entry of the file."], - "location" : { - "" : { - "comment" : "Default", - "file type" : "module and plugin", - "spdx" : ["LicenseRef-Qt-Commercial OR GPL-3.0-only"] - }, - "src/" : { - "comment" : "Default", - "file type" : "module and plugin", - "spdx" : ["LicenseRef-Qt-Commercial OR GPL-3.0-only"] - }, - "tests/" : { - "comment" : "Default", - "file type" : "test", - "spdx" : ["LicenseRef-Qt-Commercial OR GPL-3.0-only"] - }, - "(.*)(examples/|snippets/)" : { - "comment" : "Default", - "file type" : "examples and snippets", - "spdx" : ["LicenseRef-Qt-Commercial OR BSD-3-Clause"] - }, - "doc/images/" : { - "comment" : "Default", - "file type" : "documentation", - "spdx" : ["LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only"] + "location": { + "": { + "comment": "Default", + "file type": "module and plugin", + "spdx": ["LicenseRef-Qt-Commercial OR GPL-3.0-only"] + }, + "src/": { + "comment": "Default", + "file type": "module and plugin", + "spdx": ["LicenseRef-Qt-Commercial OR GPL-3.0-only"] + }, + "tests/": { + "comment": "Default", + "file type": "test", + "spdx": ["LicenseRef-Qt-Commercial OR GPL-3.0-only"] + }, + "(.*)(examples/|snippets/)": { + "comment": "Default", + "file type": "examples and snippets", + "spdx": ["LicenseRef-Qt-Commercial OR BSD-3-Clause"] + }, + "doc/images/": { + "comment": "Default", + "file type": "documentation", + "spdx": ["LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only"] } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qthttpserver-everywhere-src-6.9.0/tests/auto/qhttpserver/tst_qhttpserver.cpp new/qthttpserver-everywhere-src-6.9.1/tests/auto/qhttpserver/tst_qhttpserver.cpp --- old/qthttpserver-everywhere-src-6.9.0/tests/auto/qhttpserver/tst_qhttpserver.cpp 2025-03-29 01:31:15.000000000 +0100 +++ new/qthttpserver-everywhere-src-6.9.1/tests/auto/qhttpserver/tst_qhttpserver.cpp 2025-05-29 03:02:51.000000000 +0200 @@ -19,6 +19,7 @@ #include <QtCore/qjsonobject.h> #include <QtCore/qjsonvalue.h> #include <QtCore/qjsonarray.h> +#include <QtCore/qsemaphore.h> #include <QtCore/qtimer.h> #include <QtNetwork/qnetworkaccessmanager.h> @@ -231,6 +232,7 @@ void pipelinedRequests(); void missingHandler(); void pipelinedFutureRequests(); + void requestNotOverwritten(); void multipleResponses(); void contextObjectInOtherThreadWarning(); @@ -247,6 +249,7 @@ QString sslUrlBase; QNetworkAccessManager networkAccessManager; ReplyObject replyObject; + std::optional<QSemaphore> readySem, routeSem; }; struct CustomArg { @@ -479,6 +482,26 @@ return user; }); }); + + httpserver.route("/wait-and-return-body/", [this](const QHttpServerRequest &request) { + auto body = request.body(); + return QtConcurrent::run([body, this]() { + Q_ASSERT(readySem); + readySem->release(); + Q_ASSERT(routeSem); + routeSem->acquire(); + return QHttpServerResponse("text/plain", body); + }); + }); + + httpserver.addAfterRequestHandler( + this, [](const QHttpServerRequest &request, QHttpServerResponse &response) { + if (request.url().path().startsWith("/wait-and-return-body/")) { + auto h = response.headers(); + h.append("X-REQUEST-BODY-SIZE", QString::number(request.body().size())); + response.setHeaders(std::move(h)); + } + }); #endif #if QT_CONFIG(localserver) @@ -1356,6 +1379,77 @@ for (std::size_t i = 0; i < replies.size(); i++) checkReply(replies[i], QString::number(i)); } + +void tst_QHttpServer::requestNotOverwritten() +{ + using namespace std::chrono_literals; + readySem.emplace(); + routeSem.emplace(); + + auto cleanup = qScopeGuard([this] { + readySem.reset(); + routeSem.reset(); + }); + + QFETCH_GLOBAL(bool, useSsl); + QFETCH_GLOBAL(bool, useHttp2); + QString urlBase = useSsl ? sslUrlBase : clearUrlBase; + + constexpr qsizetype NumberProcessed = 6; + std::array<QNetworkReply *, NumberProcessed> replies; + QThreadPool::globalInstance()->setMaxThreadCount(static_cast<int>(NumberProcessed)); + + for (std::size_t i = 0; i < NumberProcessed; i++) { + auto bodySize = i + 1; // All requests have different body sizes + QByteArray body(bodySize, 'a'); + QString path = u"/wait-and-return-body/"_s; + QNetworkRequest req(QUrl(urlBase.arg(path))); + req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true); + req.setAttribute(QNetworkRequest::Http2AllowedAttribute, useHttp2); + req.setHeader(QNetworkRequest::ContentTypeHeader, "text/plain"); + replies[i] = networkAccessManager.post(req, body); + } + + auto waitUntilFuturesStarted = [this, &replies] { + if (QTest::qWaitFor([this]() { return readySem->available() == NumberProcessed; })) { + return true; + } else { + routeSem->release(NumberProcessed); + for (std::size_t i = 0; i < NumberProcessed; i++) { + if (replies[i] != nullptr) { + std::unique_ptr<QNetworkReply> replyPtr(replies[i]); + replyPtr->abort(); + } + } + return false; + } + }; + + QVERIFY(waitUntilFuturesStarted()); + readySem->acquire(NumberProcessed); + routeSem->release(NumberProcessed); // Let them complete and execute the afterrequest handlers + + QSet<int> bodySizes; + for (std::size_t i = 0; i < NumberProcessed; i++) { + QVERIFY(replies[i] != nullptr); + std::unique_ptr<QNetworkReply> replyPtr(replies[i]); + QTRY_VERIFY(replyPtr->isFinished()); + QVERIFY(replyPtr->hasRawHeader("X-REQUEST-BODY-SIZE")); + QByteArray header = replyPtr->rawHeader("X-REQUEST-BODY-SIZE"); + bool ok; + int bodySize = header.toInt(&ok); + QVERIFY(ok); + bodySizes.insert(bodySize); + } + if (useHttp2) { + QEXPECT_FAIL("", "QTBUG-133519: QHttpServerRequest overwritten during concurrent handling", + Continue); + } + QCOMPARE(bodySizes.size(), NumberProcessed); + QCOMPARE(readySem->available(), 0); + QCOMPARE(routeSem->available(), 0); +} + #endif // QT_CONFIG(concurrent) void tst_QHttpServer::multipleResponses() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qthttpserver-everywhere-src-6.9.0/tests/auto/qhttpservermultithreaded/tst_qhttpservermultithreaded.cpp new/qthttpserver-everywhere-src-6.9.1/tests/auto/qhttpservermultithreaded/tst_qhttpservermultithreaded.cpp --- old/qthttpserver-everywhere-src-6.9.0/tests/auto/qhttpservermultithreaded/tst_qhttpservermultithreaded.cpp 2025-03-29 01:31:15.000000000 +0100 +++ new/qthttpserver-everywhere-src-6.9.1/tests/auto/qhttpservermultithreaded/tst_qhttpservermultithreaded.cpp 2025-05-29 03:02:51.000000000 +0200 @@ -473,9 +473,10 @@ httpserver.route("/headers/", QHttpServerRequest::Method::Post, [this](const QHttpServerRequest &request) { - return QtConcurrent::run(&threadPool, [&request]() { + auto headers = request.headers().toListOfPairs(); + return QtConcurrent::run(&threadPool, [headers]() { QString result; - for (auto header : request.headers().toListOfPairs()) + for (auto header : headers) result += QString::fromUtf8(header.first) + "\n"; return QHttpServerResponse(result); }); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qthttpserver-everywhere-src-6.9.0/tests/benchmarks/qhttpserver/transfer/tst_bench_qhttpserver_transfer.cpp new/qthttpserver-everywhere-src-6.9.1/tests/benchmarks/qhttpserver/transfer/tst_bench_qhttpserver_transfer.cpp --- old/qthttpserver-everywhere-src-6.9.0/tests/benchmarks/qhttpserver/transfer/tst_bench_qhttpserver_transfer.cpp 2025-03-29 01:31:15.000000000 +0100 +++ new/qthttpserver-everywhere-src-6.9.1/tests/benchmarks/qhttpserver/transfer/tst_bench_qhttpserver_transfer.cpp 2025-05-29 03:02:51.000000000 +0200 @@ -75,12 +75,12 @@ QByteArray bigdata = "1"_ba.repeated(1024 * 1024 * 100); using HTTP = QHttpServerRequest::Method; server.route("/bytearray", HTTP::Get, - [=](const QHttpServerRequest &req, QHttpServerResponder &resp) { + [=](QHttpServerResponder &resp) { resp.write(bigdata, "application/octet-stream"); }); server.route("/qbuffer", HTTP::Get, - [=](const QHttpServerRequest &req, QHttpServerResponder &resp) { + [=](QHttpServerResponder &resp) { auto *buf = new QBuffer; buf->setData(bigdata); buf->open(QIODevice::ReadOnly);
