Bug 1602502 - If proxy connect is not used, don't call HttpProxyResponseToErrorCode() r=dragana

Differential Revision: https://phabricator.services.mozilla.com/D56871

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kershaw Chang 2019-12-12 18:24:40 +00:00
Родитель 33f67d36f5
Коммит d3103de230
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -1169,7 +1169,10 @@ void SpdyConnectTransaction::MapStreamToHttpConnection(
mTunnelStreamOut = new OutputStreamShim(this, mIsWebsocket);
mTunneledConn = new nsHttpConnection();
if (httpResponseCode != 200) {
// If httpResponseCode is -1, it means that proxy connect is not used. We
// should not call HttpProxyResponseToErrorCode(), since this will create a
// shim error.
if (httpResponseCode > 0 && httpResponseCode != 200) {
nsresult err = HttpProxyResponseToErrorCode(httpResponseCode);
if (NS_FAILED(err)) {
CreateShimError(err);