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

MozReview-Commit-ID: INw61hHzvDl
This commit is contained in:
Dragana Damjanovic 2016-05-03 17:39:30 -07:00
parent bb062529d8
commit 9a04d588c0

View File

@ -925,6 +925,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;
@ -978,7 +984,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.