Allow routes to return QFuture<void> and write using responder


Add support for route handlers that return QFuture<void> and
respond using QHttpServerResponder&& argument in another thread.

For an HTTP/2 connection multiple requests can be responded to at
the same time, but for an HTTP/1.x connection the requests are
handled one at a time in the order they appear. For CPU intensive
requests the HTTP/1.x connections can still benefit from the
QHttpServer thread being relieved of the work.

The socket I/O is always handled in the thread that QHttpServer
belongs to.

Now that QHttpServerRequest is copyable make it possible to pass it
by value to the route handlers.

Add tests including invalid route() calls that are conditionally
enabled, and will static_assert when enabled.

Renamed Valid to Value and removed old Value, and as a
consequence removed usages of Valid from tests.

[ChangeLog] Added support for routes handlers that return
QFuture<void> and respond using QHttpServerResponder&& argument
in another thread.

Task-number: QTBUG-108127
Change-Id: I58e3c07f5eb54b3f9443e569151b82827ef8f5f8
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
commit7eda15d03123a74fb994c3fb07d5d171ee09e378
parentf63f17bc4ef4721334745b76b7008a84d95399e5
authorØystein Heskestad <oystein.heskestad@qt.io>
committerØystein Heskestad <oystein.heskestad@qt.io>
commit timeWed, 6 Aug 2025 10:01:00 +0200