The limitation on Unix domain socket paths on Linux is 107 characters.
After c617cc95934ae3c0896082d61a88487b34cf96be the temp directory
handling on Android must have changed to go past that limitation. When
testing this the socket path on my device was
/data/user/0/org.qtproject.example.tst_qhttpservermultithreaded/cache/
tst_qhttpservermultithreaded_local11757
...which is too long and therefore the listening on the socket will
fail.
The simple quick solution to get everything working is to just shorten
the socket name a bit. Combined with the application PID it should still
be unique and not cause any other issues.
Pick-to: 6.10 6.9
Fixes: QTBUG-137849
Change-Id: Ib606ea315d7a929a37a0639c07ed08b474b54812
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
We don't really need the file descriptor for the local socket, so we can
avoid it entirely by using an abstract namespace. With this we don't
leave files behind even if the test crashes.
Change-Id: I99cdd8d4c70b6651404542d53100c6127078f8a5
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
So that instances of the test can be ran in parallel without colliding.
Pick-to: 6.9
Change-Id: I9f4497eed9841650c5f52382ae5c20e4bd73355a
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Though a route() callback can take references as arguments, they
might go out of scope when they are passed by reference to concurrent
runs. Copy the necessary data into objects that can be passed by value
into the lambda used by a concurrent run.
Pick-to: 6.8 6.9
Change-Id: I823ba380c30078624a33c73e95c60f91866bc1f4
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Similar to httpserver.
Task-number: QTBUG-130500
Pick-to: 6.9 6.8
Change-Id: Ia93c03db5ee4f7c549a37c60db639bc7f47b8c9b
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The sslPort variable is only used when SSL is available, which is
usually not the case on macOS builds.
Pick-to: 6.8
Change-Id: I6f8c023c2a85e5a3c74d737903cb994c690451a3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
To keep the API lean, remove the SSL confguration and listen()
methods.
Instead using listen() on a QAbstractHttpServer, a user should
create an instance of a QTcpServer or QSslServer, then call
listen() on it before calling bind() on a QAbstractHttpServer
with it as an argument.
Task-number: QTBUG-125859
Pick-to: 6.8
Change-Id: I366c0a01d8b7ee3802e0bdd63b9d84813338f478
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>