Bug 1269055 - If a connection is reused, retry requests even if the request method is not safe (revert to old(ff45) behavior).r=mcmanus

MozReview-Commit-ID: INw61hHzvDl

--HG--
extra : rebase_source : e819067ddec67246787e4aa150be4bf325782cc7
This commit is contained in:
Dragana Damjanovic 2016-05-03 17:39:30 -07:00
parent 85cc201190
commit d9ad6dbb9e

View File

@ -929,6 +929,12 @@ nsHttpTransaction::Close(nsresult reason)
PR_Now(), 0, EmptyCString());
}
// we must no longer reference the connection! find out if the
// connection was being reused before letting it go.
bool connReused = false;
if (mConnection) {
connReused = mConnection->IsReused();
}
mConnected = false;
mTunnelProvider = nullptr;
@ -982,7 +988,7 @@ nsHttpTransaction::Close(nsresult reason)
if (!mReceivedData &&
((mRequestHead && mRequestHead->IsSafeMethod()) ||
!reallySentData)) {
!reallySentData || connReused)) {
// if restarting fails, then we must proceed to close the pipe,
// which will notify the channel that the transaction failed.