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 2023-01-11 14:33:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qt6-httpserver (Old)
 and      /work/SRC/openSUSE:Factory/.qt6-httpserver.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qt6-httpserver"

Wed Jan 11 14:33:54 2023 rev:3 rq:1057261 version:6.4.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/qt6-httpserver/qt6-httpserver.changes    
2022-11-21 15:29:01.840476221 +0100
+++ /work/SRC/openSUSE:Factory/.qt6-httpserver.new.32243/qt6-httpserver.changes 
2023-01-11 14:34:50.913161069 +0100
@@ -1,0 +2,6 @@
+Fri Jan  6 16:46:40 UTC 2023 - Christophe Marin <[email protected]>
+
+- Update to 6.4.2:
+  * https://www.qt.io/blog/qt-6.4.2-released
+
+-------------------------------------------------------------------

Old:
----
  qthttpserver-everywhere-src-6.4.1.tar.xz

New:
----
  qthttpserver-everywhere-src-6.4.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qt6-httpserver.spec ++++++
--- /var/tmp/diff_new_pack.81WcMB/_old  2023-01-11 14:34:51.333163445 +0100
+++ /var/tmp/diff_new_pack.81WcMB/_new  2023-01-11 14:34:51.341163489 +0100
@@ -16,7 +16,7 @@
 #
 
 
-%define real_version 6.4.1
+%define real_version 6.4.2
 %define short_version 6.4
 %define tar_name qthttpserver-everywhere-src
 %define tar_suffix %{nil}
@@ -27,7 +27,7 @@
 %endif
 #
 Name:           qt6-httpserver%{?pkg_suffix}
-Version:        6.4.1
+Version:        6.4.2
 Release:        0
 Summary:        Qt HTTP Server
 License:        GPL-3.0-only

++++++ qthttpserver-everywhere-src-6.4.1.tar.xz -> 
qthttpserver-everywhere-src-6.4.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qthttpserver-everywhere-src-6.4.1/.cmake.conf 
new/qthttpserver-everywhere-src-6.4.2/.cmake.conf
--- old/qthttpserver-everywhere-src-6.4.1/.cmake.conf   2022-11-08 
20:29:32.000000000 +0100
+++ new/qthttpserver-everywhere-src-6.4.2/.cmake.conf   2022-12-12 
19:14:45.000000000 +0100
@@ -1,2 +1,2 @@
-set(QT_REPO_MODULE_VERSION "6.4.1")
+set(QT_REPO_MODULE_VERSION "6.4.2")
 set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qthttpserver-everywhere-src-6.4.1/.tag 
new/qthttpserver-everywhere-src-6.4.2/.tag
--- old/qthttpserver-everywhere-src-6.4.1/.tag  2022-11-08 20:29:32.000000000 
+0100
+++ new/qthttpserver-everywhere-src-6.4.2/.tag  2022-12-12 19:14:45.000000000 
+0100
@@ -1 +1 @@
-dc05b61b80f8c95c8512210b78444c3b0de6a8a5
+7603d016a0154fcf496f5fbcd29af04dbd4e1636
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qthttpserver-everywhere-src-6.4.1/dependencies.yaml 
new/qthttpserver-everywhere-src-6.4.2/dependencies.yaml
--- old/qthttpserver-everywhere-src-6.4.1/dependencies.yaml     2022-11-08 
20:29:32.000000000 +0100
+++ new/qthttpserver-everywhere-src-6.4.2/dependencies.yaml     2022-12-12 
19:14:45.000000000 +0100
@@ -1,7 +1,7 @@
 dependencies:
   ../qtbase:
-    ref: 905755304a474c942346774d930b92e3665c1bab
+    ref: e3e40c44d3f998a433a6a1080297c5f28e9a768f
     required: true
   ../qtwebsockets:
-    ref: b43019f5fc161a198a49a6cdd819a03d0cb173a7
+    ref: ae9a4ad36f5dcbe9e9a68cab9ea15f9f8b5350e3
     required: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/doc/addressbook-example.qdoc 
new/qthttpserver-everywhere-src-6.4.2/doc/addressbook-example.qdoc
--- old/qthttpserver-everywhere-src-6.4.1/doc/addressbook-example.qdoc  
2022-11-08 20:29:32.000000000 +0100
+++ new/qthttpserver-everywhere-src-6.4.2/doc/addressbook-example.qdoc  
1970-01-01 01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-// Copyright (C) 2022 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR 
GFDL-1.3-no-invariants-only
-
-/*!
-\ingroup qthttpserver-examples
-\title RESTful server Address Book Example
-\brief Example of how to create a RESTful API server using the QHttpServer.
-\image restful-address-book-server-example.png
-\example addressbook
-
-This example shows how to set up a RESTful API server using the QHttpServer 
class.
-The Address Book API allows create, read, update and delete operations of
-name and address entries.
-
-\snippet addressbook/main.cpp GET example
-In the example above, the route is specified for the GET method,
-which returns the JSON array with all address entries stored.
-To achieve that, the \l QHttpServer::route() method is used
-with the \l QHttpServerRequest::Method::Get enumeration.
-
-\snippet addressbook/main.cpp POST example
-In this example, the route is specified for the POST method,
-which adds a new entry to the address book and returns a JSON object
-that represents the added entry. This JSON object also contains
-an HTTP status code: \c Created for new entries,
-or \c AlreadyReported for pre-existing entries.
-This example makes use of an overload of 
QHttpServerResponse::QHttpServerResponse
-to send a JSON object and corresponding HTTP status code.
-
-To create an entry the request body must be a JSON object with
-\c address and \c name fields. For example:
-    \code
-    {
-        "address": "Example Street 1, Big City"
-        "name": "John Smith"
-    }
-    \endcode
-
-\sa {Qt Quick Demo - RESTful API client Address Book}
-*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/doc/addressbookserver-example.qdoc 
new/qthttpserver-everywhere-src-6.4.2/doc/addressbookserver-example.qdoc
--- old/qthttpserver-everywhere-src-6.4.1/doc/addressbookserver-example.qdoc    
1970-01-01 01:00:00.000000000 +0100
+++ new/qthttpserver-everywhere-src-6.4.2/doc/addressbookserver-example.qdoc    
2022-12-12 19:14:45.000000000 +0100
@@ -0,0 +1,40 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR 
GFDL-1.3-no-invariants-only
+
+/*!
+\ingroup qthttpserver-examples
+\title RESTful server Address Book Example
+\brief Example of how to create a RESTful API server using the QHttpServer.
+\image restful-address-book-server-example.png
+\example addressbookserver
+
+This example shows how to set up a RESTful API server using the QHttpServer 
class.
+The Address Book API allows create, read, update and delete operations of
+name and address entries.
+
+\snippet addressbookserver/main.cpp GET example
+In the example above, the route is specified for the GET method,
+which returns the JSON array with all address entries stored.
+To achieve that, the \l QHttpServer::route() method is used
+with the \l QHttpServerRequest::Method::Get enumeration.
+
+\snippet addressbookserver/main.cpp POST example
+In this example, the route is specified for the POST method,
+which adds a new entry to the address book and returns a JSON object
+that represents the added entry. This JSON object also contains
+an HTTP status code: \c Created for new entries,
+or \c AlreadyReported for pre-existing entries.
+This example makes use of an overload of 
QHttpServerResponse::QHttpServerResponse
+to send a JSON object and corresponding HTTP status code.
+
+To create an entry the request body must be a JSON object with
+\c address and \c name fields. For example:
+    \code
+    {
+        "address": "Example Street 1, Big City"
+        "name": "John Smith"
+    }
+    \endcode
+
+\sa {Qt Quick Demo - RESTful API client Address Book}
+*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qthttpserver-everywhere-src-6.4.1/doc/index.qdoc 
new/qthttpserver-everywhere-src-6.4.2/doc/index.qdoc
--- old/qthttpserver-everywhere-src-6.4.1/doc/index.qdoc        2022-11-08 
20:29:32.000000000 +0100
+++ new/qthttpserver-everywhere-src-6.4.2/doc/index.qdoc        2022-12-12 
19:14:45.000000000 +0100
@@ -8,11 +8,9 @@
     \brief Provides a lightweight server implementing the HTTP protocol.
 
     Qt HTTP Server supports building HTTP server functionality into an 
application.
-    It provides an implementation of the server side of the HTTP protocol, and 
also
-    provides security through Transport Layer Security. Because it is designed 
for
-    embedding in applications to expose things in a trusted network, and 
doesn't
-    have robustness/security as a goal, it is not suitable for being
-    internet-facing.
+    Common use cases are exposing the application's functionality through
+    REST APIs, or making devices in a trusted environment configurable also 
via HTTP.
+    The limitations are described in \l{Limitations & Security}.
 
     This module is in \e {Technical Preview} state.
 
@@ -36,9 +34,17 @@
 
     Runtime logging can be configured as described 
\l{qthttpserver-logging.html}{here}.
 
-    When security is needed and you have Qt compiled with support for TLS,
-    you can bind QAbstractHttpServer and its subclasses to a QSslServer object,
-    providing Transport Layer Security handling, turning it into an HTTPS 
server.
+    \section1 Limitations & Security
+
+    Qt HTTP Server does not have many of the more advanced features and 
optimizations
+    that general-purpose HTTP servers have. It also has not seen
+    the same scrutiny regarding various attack vectors over the network.
+    Use Qt HTTP Server, therefore, only for local connections
+    or in a trusted network, and do not expose the ports to the internet.
+
+    You can add HTTPS support as a basic security measure, though. If Qt is 
compiled
+    with support for TLS, you can bind QAbstractHttpServer and its subclasses 
to a
+    QSslServer object, providing Transport Layer Security handling.
     This can also be achieved by calling the QAbstractHttpServer::sslSetup()
     function before calling \l{QAbstractHttpServer::}{listen()}.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/examples/httpserver/CMakeLists.txt 
new/qthttpserver-everywhere-src-6.4.2/examples/httpserver/CMakeLists.txt
--- old/qthttpserver-everywhere-src-6.4.1/examples/httpserver/CMakeLists.txt    
2022-11-08 20:29:32.000000000 +0100
+++ new/qthttpserver-everywhere-src-6.4.2/examples/httpserver/CMakeLists.txt    
2022-12-12 19:14:45.000000000 +0100
@@ -1,4 +1,3 @@
-# Generated from httpserver.pro.
-
+qt_internal_add_example(addressbookserver)
 qt_internal_add_example(afterrequest)
 qt_internal_add_example(simple)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/examples/httpserver/addressbook/CMakeLists.txt
 
new/qthttpserver-everywhere-src-6.4.2/examples/httpserver/addressbook/CMakeLists.txt
--- 
old/qthttpserver-everywhere-src-6.4.1/examples/httpserver/addressbook/CMakeLists.txt
        2022-11-08 20:29:32.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/examples/httpserver/addressbook/CMakeLists.txt
        1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-# Copyright (C) 2022 The Qt Company Ltd.
-# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-cmake_minimum_required(VERSION 3.16)
-project(addressbookserver LANGUAGES CXX)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
-    set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/httpserver/${PROJECT_NAME}")
-
-find_package(Qt6 REQUIRED COMPONENTS HttpServer)
-
-qt_add_executable(addressbookserver
-    main.cpp
-)
-
-target_link_libraries(addressbookserver PRIVATE
-    Qt::HttpServer
-)
-
-install(TARGETS addressbookserver
-    RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
-    BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
-    LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/examples/httpserver/addressbook/main.cpp 
new/qthttpserver-everywhere-src-6.4.2/examples/httpserver/addressbook/main.cpp
--- 
old/qthttpserver-everywhere-src-6.4.1/examples/httpserver/addressbook/main.cpp  
    2022-11-08 20:29:32.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/examples/httpserver/addressbook/main.cpp  
    1970-01-01 01:00:00.000000000 +0100
@@ -1,167 +0,0 @@
-// Copyright (C) 2022 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-#include <QtCore>
-#include <QtHttpServer>
-
-#define API_KEY "SecretKey"
-
-struct ContactEntry
-{
-    qint64 id;
-    QString name;
-    QString address;
-
-    ContactEntry(const QString &name, const QString &address)
-        : id(ContactEntry::nextId()), name(name), address(address)
-    {
-    }
-
-    QJsonObject toJson() const
-    {
-        return QJsonObject{ { "id", id }, { "name", name }, { "address", 
address } };
-    }
-
-private:
-    static qint64 nextId();
-};
-
-qint64 ContactEntry::nextId()
-{
-    static qint64 lastId = 0;
-    return lastId++;
-}
-
-static bool checkApiKeyHeader(const QList<QPair<QByteArray, QByteArray>> 
&headers)
-{
-    for (const auto &[key, value] : headers) {
-        if (key == "api_key" && value == API_KEY) {
-            return true;
-        }
-    }
-    return false;
-}
-
-static QJsonObject insertAddress(QMap<qint64, ContactEntry> &contacts, const 
QString &name,
-                                 const QString &address)
-{
-    ContactEntry entry(name, address);
-    const auto it = contacts.insert(entry.id, std::move(entry));
-    return it->toJson();
-}
-
-static std::optional<QJsonObject> byteArrayToJsonObject(const QByteArray &arr)
-{
-    QJsonParseError err;
-    const auto json = QJsonDocument::fromJson(arr, &err);
-    if (err.error || !json.isObject())
-        return std::nullopt;
-    return json.object();
-}
-
-int main(int argc, char *argv[])
-{
-    QCoreApplication app(argc, argv);
-
-    QMap<qint64, ContactEntry> contacts;
-    // Setup QHttpServer
-    QHttpServer httpServer;
-    //! [GET example]
-    httpServer.route("/v2/contact", QHttpServerRequest::Method::Get,
-                     [&contacts](const QHttpServerRequest &) {
-                         QJsonArray array;
-                         std::transform(contacts.cbegin(), contacts.cend(),
-                                        std::inserter(array, array.begin()),
-                                        [](const auto &it) { return 
it.toJson(); });
-
-                         return QHttpServerResponse(array);
-                     });
-    //! [GET example]
-
-    httpServer.route("/v2/contact/<arg>", QHttpServerRequest::Method::Get,
-                     [&contacts](qint64 contactId, const QHttpServerRequest &) 
{
-                         const auto address = contacts.find(contactId);
-                         return address != contacts.end()
-                                 ? QHttpServerResponse(address->toJson())
-                                 : 
QHttpServerResponse(QHttpServerResponder::StatusCode::NotFound);
-                     });
-
-    //! [POST example]
-    httpServer.route(
-            "/v2/contact", QHttpServerRequest::Method::Post,
-            [&contacts](const QHttpServerRequest &request) {
-                if (!checkApiKeyHeader(request.headers())) {
-                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::Unauthorized);
-                }
-                const auto json = byteArrayToJsonObject(request.body());
-                if (!json || !json->contains("address") || 
!json->contains("name"))
-                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::BadRequest);
-                const auto entry = insertAddress(contacts, 
json->value("name").toString(),
-                                                 
json->value("address").toString());
-                return QHttpServerResponse(entry, 
QHttpServerResponder::StatusCode::Created);
-            });
-    //! [POST example]
-
-    httpServer.route(
-            "/v2/contact/<arg>", QHttpServerRequest::Method::Put,
-            [&contacts](qint64 contactId, const QHttpServerRequest &request) {
-                if (!checkApiKeyHeader(request.headers())) {
-                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::Unauthorized);
-                }
-                const auto json = byteArrayToJsonObject(request.body());
-                if (!json || !json->contains("address") || 
!json->contains("name")) {
-                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::BadRequest);
-                }
-                auto address = contacts.find(contactId);
-                if (address == contacts.end())
-                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::NoContent);
-                address->name = json->value("name").toString();
-                address->address = json->value("address").toString();
-                return QHttpServerResponse(address->toJson());
-            });
-
-    httpServer.route(
-            "/v2/contact/<arg>", QHttpServerRequest::Method::Patch,
-            [&contacts](qint64 contactId, const QHttpServerRequest &request) {
-                if (!checkApiKeyHeader(request.headers())) {
-                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::Unauthorized);
-                }
-                const auto json = byteArrayToJsonObject(request.body());
-                if (!json) {
-                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::BadRequest);
-                }
-                auto address = contacts.find(contactId);
-                if (address == contacts.end())
-                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::NoContent);
-                if (json->contains("name"))
-                    address->name = json->value("name").toString();
-                if (json->contains("address"))
-                    address->address = json->value("address").toString();
-                return QHttpServerResponse(address->toJson());
-            });
-
-    httpServer.route(
-            "/v2/contact/<arg>", QHttpServerRequest::Method::Delete,
-            [&contacts](qint64 contactId, const QHttpServerRequest &request) {
-                if (!checkApiKeyHeader(request.headers())) {
-                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::Unauthorized);
-                }
-                if (!contacts.remove(contactId))
-                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::NoContent);
-                return 
QHttpServerResponse(QHttpServerResponder::StatusCode::Ok);
-            });
-
-    const auto port = httpServer.listen(QHostAddress::Any);
-    if (!port) {
-        qDebug() << QCoreApplication::translate("QHttpServerExample",
-                                                "Server failed to listen on a 
port.");
-        return 0;
-    }
-
-    qDebug() << QCoreApplication::translate(
-                        "QHttpServerExample",
-                        "Running on http://127.0.0.1:%1/ (Press CTRL+C to 
quit)")
-                        .arg(port);
-
-    return app.exec();
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/examples/httpserver/addressbookserver/CMakeLists.txt
 
new/qthttpserver-everywhere-src-6.4.2/examples/httpserver/addressbookserver/CMakeLists.txt
--- 
old/qthttpserver-everywhere-src-6.4.1/examples/httpserver/addressbookserver/CMakeLists.txt
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/examples/httpserver/addressbookserver/CMakeLists.txt
  2022-12-12 19:14:45.000000000 +0100
@@ -0,0 +1,27 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(addressbookserver LANGUAGES CXX)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+    set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/httpserver/${PROJECT_NAME}")
+
+find_package(Qt6 REQUIRED COMPONENTS HttpServer)
+
+qt_add_executable(addressbookserver
+    main.cpp
+)
+
+target_link_libraries(addressbookserver PRIVATE
+    Qt::HttpServer
+)
+
+install(TARGETS addressbookserver
+    RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+    BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+    LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/examples/httpserver/addressbookserver/main.cpp
 
new/qthttpserver-everywhere-src-6.4.2/examples/httpserver/addressbookserver/main.cpp
--- 
old/qthttpserver-everywhere-src-6.4.1/examples/httpserver/addressbookserver/main.cpp
        1970-01-01 01:00:00.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/examples/httpserver/addressbookserver/main.cpp
        2022-12-12 19:14:45.000000000 +0100
@@ -0,0 +1,167 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QtCore>
+#include <QtHttpServer>
+
+#define API_KEY "SecretKey"
+
+struct ContactEntry
+{
+    qint64 id;
+    QString name;
+    QString address;
+
+    ContactEntry(const QString &name, const QString &address)
+        : id(ContactEntry::nextId()), name(name), address(address)
+    {
+    }
+
+    QJsonObject toJson() const
+    {
+        return QJsonObject{ { "id", id }, { "name", name }, { "address", 
address } };
+    }
+
+private:
+    static qint64 nextId();
+};
+
+qint64 ContactEntry::nextId()
+{
+    static qint64 lastId = 0;
+    return lastId++;
+}
+
+static bool checkApiKeyHeader(const QList<QPair<QByteArray, QByteArray>> 
&headers)
+{
+    for (const auto &[key, value] : headers) {
+        if (key == "api_key" && value == API_KEY) {
+            return true;
+        }
+    }
+    return false;
+}
+
+static QJsonObject insertAddress(QMap<qint64, ContactEntry> &contacts, const 
QString &name,
+                                 const QString &address)
+{
+    ContactEntry entry(name, address);
+    const auto it = contacts.insert(entry.id, std::move(entry));
+    return it->toJson();
+}
+
+static std::optional<QJsonObject> byteArrayToJsonObject(const QByteArray &arr)
+{
+    QJsonParseError err;
+    const auto json = QJsonDocument::fromJson(arr, &err);
+    if (err.error || !json.isObject())
+        return std::nullopt;
+    return json.object();
+}
+
+int main(int argc, char *argv[])
+{
+    QCoreApplication app(argc, argv);
+
+    QMap<qint64, ContactEntry> contacts;
+    // Setup QHttpServer
+    QHttpServer httpServer;
+    //! [GET example]
+    httpServer.route("/v2/contact", QHttpServerRequest::Method::Get,
+                     [&contacts](const QHttpServerRequest &) {
+                         QJsonArray array;
+                         std::transform(contacts.cbegin(), contacts.cend(),
+                                        std::inserter(array, array.begin()),
+                                        [](const auto &it) { return 
it.toJson(); });
+
+                         return QHttpServerResponse(array);
+                     });
+    //! [GET example]
+
+    httpServer.route("/v2/contact/<arg>", QHttpServerRequest::Method::Get,
+                     [&contacts](qint64 contactId, const QHttpServerRequest &) 
{
+                         const auto address = contacts.find(contactId);
+                         return address != contacts.end()
+                                 ? QHttpServerResponse(address->toJson())
+                                 : 
QHttpServerResponse(QHttpServerResponder::StatusCode::NotFound);
+                     });
+
+    //! [POST example]
+    httpServer.route(
+            "/v2/contact", QHttpServerRequest::Method::Post,
+            [&contacts](const QHttpServerRequest &request) {
+                if (!checkApiKeyHeader(request.headers())) {
+                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::Unauthorized);
+                }
+                const auto json = byteArrayToJsonObject(request.body());
+                if (!json || !json->contains("address") || 
!json->contains("name"))
+                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::BadRequest);
+                const auto entry = insertAddress(contacts, 
json->value("name").toString(),
+                                                 
json->value("address").toString());
+                return QHttpServerResponse(entry, 
QHttpServerResponder::StatusCode::Created);
+            });
+    //! [POST example]
+
+    httpServer.route(
+            "/v2/contact/<arg>", QHttpServerRequest::Method::Put,
+            [&contacts](qint64 contactId, const QHttpServerRequest &request) {
+                if (!checkApiKeyHeader(request.headers())) {
+                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::Unauthorized);
+                }
+                const auto json = byteArrayToJsonObject(request.body());
+                if (!json || !json->contains("address") || 
!json->contains("name")) {
+                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::BadRequest);
+                }
+                auto address = contacts.find(contactId);
+                if (address == contacts.end())
+                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::NoContent);
+                address->name = json->value("name").toString();
+                address->address = json->value("address").toString();
+                return QHttpServerResponse(address->toJson());
+            });
+
+    httpServer.route(
+            "/v2/contact/<arg>", QHttpServerRequest::Method::Patch,
+            [&contacts](qint64 contactId, const QHttpServerRequest &request) {
+                if (!checkApiKeyHeader(request.headers())) {
+                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::Unauthorized);
+                }
+                const auto json = byteArrayToJsonObject(request.body());
+                if (!json) {
+                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::BadRequest);
+                }
+                auto address = contacts.find(contactId);
+                if (address == contacts.end())
+                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::NoContent);
+                if (json->contains("name"))
+                    address->name = json->value("name").toString();
+                if (json->contains("address"))
+                    address->address = json->value("address").toString();
+                return QHttpServerResponse(address->toJson());
+            });
+
+    httpServer.route(
+            "/v2/contact/<arg>", QHttpServerRequest::Method::Delete,
+            [&contacts](qint64 contactId, const QHttpServerRequest &request) {
+                if (!checkApiKeyHeader(request.headers())) {
+                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::Unauthorized);
+                }
+                if (!contacts.remove(contactId))
+                    return 
QHttpServerResponse(QHttpServerResponder::StatusCode::NoContent);
+                return 
QHttpServerResponse(QHttpServerResponder::StatusCode::Ok);
+            });
+
+    const auto port = httpServer.listen(QHostAddress::Any);
+    if (!port) {
+        qDebug() << QCoreApplication::translate("QHttpServerExample",
+                                                "Server failed to listen on a 
port.");
+        return 0;
+    }
+
+    qDebug() << QCoreApplication::translate(
+                        "QHttpServerExample",
+                        "Running on http://127.0.0.1:%1/ (Press CTRL+C to 
quit)")
+                        .arg(port);
+
+    return app.exec();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qabstracthttpserver_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qabstracthttpserver_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qabstracthttpserver_p.h
       2022-11-08 20:29:32.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qabstracthttpserver_p.h
       1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/httpserver/qabstracthttpserver_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserver_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserver_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserver_p.h
       2022-11-08 20:29:32.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserver_p.h
       1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/httpserver/qhttpserver_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverliterals_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverliterals_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverliterals_p.h
       2022-11-08 20:29:32.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverliterals_p.h
       1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/httpserver/qhttpserverliterals_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverrequest_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverrequest_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverrequest_p.h
        2022-11-08 20:29:32.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverrequest_p.h
        1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/httpserver/qhttpserverrequest_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverresponder_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverresponder_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverresponder_p.h
      2022-11-08 20:29:32.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverresponder_p.h
      1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/httpserver/qhttpserverresponder_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverresponse_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverresponse_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverresponse_p.h
       2022-11-08 20:29:32.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverresponse_p.h
       1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/httpserver/qhttpserverresponse_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverrouter_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverrouter_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverrouter_p.h
 2022-11-08 20:29:32.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverrouter_p.h
 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/httpserver/qhttpserverrouter_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverrouterrule_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverrouterrule_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverrouterrule_p.h
     2022-11-08 20:29:32.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.1/QtHttpServer/private/qhttpserverrouterrule_p.h
     1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/httpserver/qhttpserverrouterrule_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qabstracthttpserver_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qabstracthttpserver_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qabstracthttpserver_p.h
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qabstracthttpserver_p.h
       2022-12-12 19:14:45.000000000 +0100
@@ -0,0 +1 @@
+#include "../../../../../src/httpserver/qabstracthttpserver_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserver_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserver_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserver_p.h
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserver_p.h
       2022-12-12 19:14:45.000000000 +0100
@@ -0,0 +1 @@
+#include "../../../../../src/httpserver/qhttpserver_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverliterals_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverliterals_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverliterals_p.h
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverliterals_p.h
       2022-12-12 19:14:45.000000000 +0100
@@ -0,0 +1 @@
+#include "../../../../../src/httpserver/qhttpserverliterals_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverrequest_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverrequest_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverrequest_p.h
        1970-01-01 01:00:00.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverrequest_p.h
        2022-12-12 19:14:45.000000000 +0100
@@ -0,0 +1 @@
+#include "../../../../../src/httpserver/qhttpserverrequest_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverresponder_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverresponder_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverresponder_p.h
      1970-01-01 01:00:00.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverresponder_p.h
      2022-12-12 19:14:45.000000000 +0100
@@ -0,0 +1 @@
+#include "../../../../../src/httpserver/qhttpserverresponder_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverresponse_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverresponse_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverresponse_p.h
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverresponse_p.h
       2022-12-12 19:14:45.000000000 +0100
@@ -0,0 +1 @@
+#include "../../../../../src/httpserver/qhttpserverresponse_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverrouter_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverrouter_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverrouter_p.h
 1970-01-01 01:00:00.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverrouter_p.h
 2022-12-12 19:14:45.000000000 +0100
@@ -0,0 +1 @@
+#include "../../../../../src/httpserver/qhttpserverrouter_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverrouterrule_p.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverrouterrule_p.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverrouterrule_p.h
     1970-01-01 01:00:00.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/6.4.2/QtHttpServer/private/qhttpserverrouterrule_p.h
     2022-12-12 19:14:45.000000000 +0100
@@ -0,0 +1 @@
+#include "../../../../../src/httpserver/qhttpserverrouterrule_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/qthttpserverversion.h
 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/qthttpserverversion.h
--- 
old/qthttpserver-everywhere-src-6.4.1/include/QtHttpServer/qthttpserverversion.h
    2022-11-10 12:06:08.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/include/QtHttpServer/qthttpserverversion.h
    2022-12-13 08:05:11.000000000 +0100
@@ -2,8 +2,8 @@
 #ifndef QT_QTHTTPSERVER_VERSION_H
 #define QT_QTHTTPSERVER_VERSION_H
 
-#define QTHTTPSERVER_VERSION_STR "6.4.1"
+#define QTHTTPSERVER_VERSION_STR "6.4.2"
 
-#define QTHTTPSERVER_VERSION 0x060401
+#define QTHTTPSERVER_VERSION 0x060402
 
 #endif // QT_QTHTTPSERVER_VERSION_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/src/httpserver/qabstracthttpserver.cpp 
new/qthttpserver-everywhere-src-6.4.2/src/httpserver/qabstracthttpserver.cpp
--- 
old/qthttpserver-everywhere-src-6.4.1/src/httpserver/qabstracthttpserver.cpp    
    2022-11-08 20:29:32.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/src/httpserver/qabstracthttpserver.cpp    
    2022-12-12 19:14:45.000000000 +0100
@@ -198,7 +198,7 @@
 {
     QList<quint16> ports;
     auto children = findChildren<QTcpServer *>();
-    ports.reserve(children.count());
+    ports.reserve(children.size());
     std::transform(children.cbegin(), children.cend(), 
std::back_inserter(ports),
                    [](const QTcpServer *server) { return server->serverPort(); 
});
     return ports;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/src/httpserver/qhttpserverrequest.cpp 
new/qthttpserver-everywhere-src-6.4.2/src/httpserver/qhttpserverrequest.cpp
--- old/qthttpserver-everywhere-src-6.4.1/src/httpserver/qhttpserverrequest.cpp 
2022-11-08 20:29:32.000000000 +0100
+++ new/qthttpserver-everywhere-src-6.4.2/src/httpserver/qhttpserverrequest.cpp 
2022-12-12 19:14:45.000000000 +0100
@@ -63,7 +63,7 @@
     const auto requestMethod = line.first(i);
     i++;
 
-    while (i < line.length() && line[i] == ' ')
+    while (i < line.size() && line[i] == ' ')
         i++;
 
     auto j = line.indexOf(' ', i);
@@ -73,16 +73,16 @@
     const auto requestUrl = line.sliced(i, j - i);
     i = j + 1;
 
-    while (i < line.length() && line[i] == ' ')
+    while (i < line.size() && line[i] == ' ')
         i++;
 
-    if (i >= line.length())
+    if (i >= line.size())
         return false;
 
     j = line.indexOf(' ', i);
 
     const auto protocol = j == -1 ? line.sliced(i) : line.sliced(i, j - i);
-    if (protocol.length() != 8 || !protocol.startsWith("HTTP"))
+    if (protocol.size() != 8 || !protocol.startsWith("HTTP"))
         return false;
 
     parser.setMajorVersion(protocol[5] - '0');
@@ -143,7 +143,7 @@
         if (c == '\n') {
             // remove the CR at the end
             if (fragment.endsWith('\r')) {
-                fragment.truncate(fragment.length() - 1);
+                fragment.truncate(fragment.size() - 1);
             }
             bool ok = parseRequestLine(fragment);
             state = State::ReadingHeader;
@@ -211,8 +211,8 @@
 
                 // there is another case: We have no headers. Then the 
fragment equals just the line
                 // ending
-                if ((fragment.length() == 2 && fragment.endsWith("\r\n"))
-                    || (fragment.length() == 1 && fragment.endsWith("\n")))
+                if ((fragment.size() == 2 && fragment.endsWith("\r\n"))
+                    || (fragment.size() == 1 && fragment.endsWith("\n")))
                     allHeaders = true;
             }
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/tests/auto/qabstracthttpserver/tst_qabstracthttpserver.cpp
 
new/qthttpserver-everywhere-src-6.4.2/tests/auto/qabstracthttpserver/tst_qabstracthttpserver.cpp
--- 
old/qthttpserver-everywhere-src-6.4.1/tests/auto/qabstracthttpserver/tst_qabstracthttpserver.cpp
    2022-11-08 20:29:32.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/tests/auto/qabstracthttpserver/tst_qabstracthttpserver.cpp
    2022-12-12 19:14:45.000000000 +0100
@@ -152,7 +152,7 @@
     auto s2 = makeWebSocket();
 
     QSignalSpy newConnectionSpy(&server, &HttpServer::newWebSocketConnection);
-    QTRY_COMPARE(newConnectionSpy.count(), 2);
+    QTRY_COMPARE(newConnectionSpy.size(), 2);
     server.nextPendingWebSocketConnection();
     server.nextPendingWebSocketConnection();
     delete s1;
@@ -176,8 +176,8 @@
     auto tcpServer2 = new QTcpServer;
     tcpServer2->listen();
     server.bind(tcpServer2);
-    QTRY_COMPARE(server.servers().count(), 2);
-    QTRY_COMPARE(server.serverPorts().count(), 2);
+    QTRY_COMPARE(server.servers().size(), 2);
+    QTRY_COMPARE(server.serverPorts().size(), 2);
     QTRY_COMPARE(server.servers().first(), tcpServer);
     QTRY_COMPARE(server.serverPorts().first(), tcpServer->serverPort());
     QTRY_COMPARE(server.servers().last(), tcpServer2);
@@ -236,7 +236,7 @@
     const QUrl 
url(QString::fromLatin1("http://localhost:%1";).arg(tcpServer->serverPort()));
     auto reply = networkAccessManager.get(QNetworkRequest(url));
     QSignalSpy finishedSpy(reply, &QNetworkReply::finished);
-    QTRY_VERIFY(finishedSpy.count());
+    QTRY_VERIFY(finishedSpy.size());
     QCOMPARE(reply->readAll(), message);
     reply->close();
     reply->deleteLater();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qthttpserver-everywhere-src-6.4.1/tests/auto/qhttpserverresponder/tst_qhttpserverresponder.cpp
 
new/qthttpserver-everywhere-src-6.4.2/tests/auto/qhttpserverresponder/tst_qhttpserverresponder.cpp
--- 
old/qthttpserver-everywhere-src-6.4.1/tests/auto/qhttpserverresponder/tst_qhttpserverresponder.cpp
  2022-11-08 20:29:32.000000000 +0100
+++ 
new/qthttpserver-everywhere-src-6.4.2/tests/auto/qhttpserverresponder/tst_qhttpserverresponder.cpp
  2022-12-12 19:14:45.000000000 +0100
@@ -203,7 +203,7 @@
     
QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 
code);
     QCOMPARE(reply->readAll().trimmed(), data);
 
-    QCOMPARE(spyDestroyIoDevice.count(), 1);
+    QCOMPARE(spyDestroyIoDevice.size(), 1);
 }
 
 void tst_QHttpServerResponder::writeFileExtraHeader()
@@ -227,7 +227,7 @@
     QCOMPARE(reply->header(QNetworkRequest::ServerHeader).toByteArray(), 
headerServerValue);
     QCOMPARE(reply->readAll().trimmed(), "<html></html>");
 
-    QCOMPARE(spyDestroyIoDevice.count(), 1);
+    QCOMPARE(spyDestroyIoDevice.size(), 1);
 }
 
 void tst_QHttpServerResponder::writeByteArrayExtraHeader()

Reply via email to