Forward SNI and Host header from QNRequest to WebSockets


We didn't forward the 'peerVerifyName' to the underlying QSslSocket, so
there was no real way to specify it for WebSockets. Users may already
have it set on the QNetworkRequest so we can take it from there.

On top of this, we _did_ apply the Host header from the QNRequest, but
it ended up as a separate entry from the one we always emit as part of
createHandShakeRequest(...). Now, instead, we override it if it's set.

Since we don't have a server-side API to retrieve the specified Server
Name Indication (SNI) we don't test it now, but I have verified it with
the reproducer in the bug report.

Pick-to: 6.11 6.10
Fixes: QTBUG-141396
Change-Id: I81afdfe0cefd7cdff59820697e103b572a58dd50
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
commitabb94decf8c1b13cca2d3071d9376a3569733f93
parent460d3eb3d856630c6b7edf8f4c20fbb25a78b0a5
authorMårten Nordheim <marten.nordheim@qt.io>
committerMårten Nordheim <marten.nordheim@qt.io>
commit timeMon, 23 Feb 2026 19:08:15 +0100