mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 18:55:30 +00:00
Bug 1527005 - WebSocketChannel hangs waiting for OnTransportAvailable when server responds to upgrade request with HTTP/1.0, r=dragana
We must fail if server responds with HTTP/1.0 because HTTP upgrade requires at least HTTP/1.1 and nsHttpChannel correctly won't perform the upgrade, i.e WebSocketChannel::OnTransportAvailable won't be called. --HG-- extra : rebase_source : a5af566c8a8dfc5e50aa74fcc1f0e552937e4b4e
This commit is contained in:
parent
88ffa67e55
commit
126cc12cee
@ -3699,7 +3699,8 @@ WebSocketChannel::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) {
|
||||
do_QueryInterface(mHttpChannel);
|
||||
uint32_t versionMajor, versionMinor;
|
||||
rv = internalChannel->GetResponseVersion(&versionMajor, &versionMinor);
|
||||
if (NS_FAILED(rv) || (versionMajor != 1 && versionMajor != 2) ||
|
||||
if (NS_FAILED(rv) ||
|
||||
!((versionMajor == 1 && versionMinor != 0) || versionMajor == 2) ||
|
||||
(versionMajor == 1 && status != 101) ||
|
||||
(versionMajor == 2 && status != 200)) {
|
||||
AbortSession(NS_ERROR_CONNECTION_REFUSED);
|
||||
|
Loading…
Reference in New Issue
Block a user