diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-22 18:41:22 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-22 18:41:22 +0100 |
commit | 3403d5f049bf476a495c30026d5002db0e742887 (patch) | |
tree | 277e1105991597a478467a4fd6c09b30e4935e70 /netwerk/protocol/http/nsHttpConnection.cpp | |
parent | 34939b2d177be9d397e17d6a16837dd60e6b3906 (diff) | |
download | UXP-3403d5f049bf476a495c30026d5002db0e742887.tar UXP-3403d5f049bf476a495c30026d5002db0e742887.tar.gz UXP-3403d5f049bf476a495c30026d5002db0e742887.tar.lz UXP-3403d5f049bf476a495c30026d5002db0e742887.tar.xz UXP-3403d5f049bf476a495c30026d5002db0e742887.zip |
Close the transaction if PR_Read/PR_Write failed.
When PR_Read/PR_White returns -1, we have to use ErrorAccordingToNSPR
to get the error code.
We need to close the transaction if a real error happens.
Diffstat (limited to 'netwerk/protocol/http/nsHttpConnection.cpp')
-rw-r--r-- | netwerk/protocol/http/nsHttpConnection.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/netwerk/protocol/http/nsHttpConnection.cpp b/netwerk/protocol/http/nsHttpConnection.cpp index 8ccba76e2..71a08e177 100644 --- a/netwerk/protocol/http/nsHttpConnection.cpp +++ b/netwerk/protocol/http/nsHttpConnection.cpp @@ -639,7 +639,9 @@ nsHttpConnection::Activate(nsAHttpTransaction *trans, uint32_t caps, int32_t pri } if (mTLSFilter) { - mTLSFilter->SetProxiedTransaction(trans); + RefPtr<NullHttpTransaction> baseTrans(do_QueryReferent(mWeakTrans)); + rv = mTLSFilter->SetProxiedTransaction(trans, baseTrans); + NS_ENSURE_SUCCESS(rv, rv); mTransaction = mTLSFilter; } @@ -1979,7 +1981,7 @@ nsHttpConnection::OnSocketReadable() // negotiation are known (which is determined from the write path). // If the server speaks SPDY it is likely the readable data here is // a spdy settings frame and without NPN it would be misinterpreted - // as HTTP/* + // as HTTP LOG(("nsHttpConnection::OnSocketReadable %p return due to inactive " "tunnel setup but incomplete NPN state\n", this)); @@ -2019,12 +2021,14 @@ nsHttpConnection::OnSocketReadable() } void -nsHttpConnection::SetupSecondaryTLS() +nsHttpConnection::SetupSecondaryTLS(nsAHttpTransaction *aSpdyConnectTransaction) { MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread); MOZ_ASSERT(!mTLSFilter); - LOG(("nsHttpConnection %p SetupSecondaryTLS %s %d\n", - this, mConnInfo->Origin(), mConnInfo->OriginPort())); + LOG(("nsHttpConnection %p SetupSecondaryTLS %s %d " + "aSpdyConnectTransaction=%p\n", + this, mConnInfo->Origin(), mConnInfo->OriginPort(), + aSpdyConnectTransaction)); nsHttpConnectionInfo *ci = nullptr; if (mTransaction) { @@ -2041,6 +2045,7 @@ nsHttpConnection::SetupSecondaryTLS() if (mTransaction) { mTransaction = mTLSFilter; } + mWeakTrans = do_GetWeakReference(aSpdyConnectTransaction); } void |