Bug 1082261 - http 421 retry r=hurley
authorPatrick McManus <mcmanus@ducksong.com>
Mon, 13 Oct 2014 20:51:50 -0400
changeset 211933 a2609830541abaa4643d35c8cd66c5a2396873c2
parent 211932 73f9ba00bc7443579e24db34bf4e28ee7ccf1c13
child 211934 2220d82f3fc3bb730abbe688373433509af2b2b8
push id27693
push userryanvm@gmail.com
push dateThu, 23 Oct 2014 18:06:22 +0000
treeherdermozilla-central@d8de0d7e52e0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershurley
bugs1082261
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1082261 - http 421 retry r=hurley
netwerk/protocol/http/nsHttpTransaction.cpp
--- a/netwerk/protocol/http/nsHttpTransaction.cpp
+++ b/netwerk/protocol/http/nsHttpTransaction.cpp
@@ -1445,18 +1445,20 @@ nsHttpTransaction::HandleContentStart()
             mNoContent = true;
             LOG(("this response should not contain a body.\n"));
             break;
         case 421:
             if (!mConnInfo->GetAuthenticationHost().IsEmpty()) {
                 LOG(("Not Authoritative.\n"));
                 gHttpHandler->ConnMgr()->
                     ClearHostMapping(mConnInfo->GetHost(), mConnInfo->Port());
-                mForceRestart = true;
             }
+            // retry on a new connection - just in case
+            mCaps &= ~NS_HTTP_ALLOW_KEEPALIVE;
+            mForceRestart = true; // force restart has built in loop protection
             break;
         }
 
         if (mResponseHead->Status() == 200 &&
             mConnection->IsProxyConnectInProgress()) {
             // successful CONNECTs do not have response bodies
             mNoContent = true;
         }