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>