Bug 1690000 - Always reset ConnInfo if it is using Http3. r=necko-reviewers,kershaw
authorDragana Damjanovic <dd.mozilla@gmail.com>
Mon, 01 Feb 2021 14:05:31 +0000
changeset 3480206 ff51ad2fc1e85b3c6a8ebfc5d425a687b5722a14
parent 3480205 1b3b3291fe1baa39557882730751f8ee47ee5ef2
child 3480207 082a0d699c97597eed40e6344ddcba2669777266
push id648815
push userwptsync@mozilla.com
push dateMon, 01 Feb 2021 17:48:27 +0000
treeherdertry@abfb9840bad0 [default view] [failures only]
reviewersnecko-reviewers, kershaw
bugs1690000
milestone87.0a1
Bug 1690000 - Always reset ConnInfo if it is using Http3. r=necko-reviewers,kershaw Differential Revision: https://phabricator.services.mozilla.com/D103634
netwerk/protocol/http/nsHttpTransaction.cpp
--- a/netwerk/protocol/http/nsHttpTransaction.cpp
+++ b/netwerk/protocol/http/nsHttpTransaction.cpp
@@ -1784,17 +1784,17 @@ nsresult nsHttpTransaction::Restart() {
     MutexAutoLock lock(mLock);
     mConnection = nullptr;
   }
 
   // Reset this to our default state, since this may change from one restart
   // to the next
   mReuseOnRestart = false;
 
-  if (!mDoNotRemoveAltSvc && !mConnInfo->GetRoutedHost().IsEmpty() &&
+  if (!mDoNotRemoveAltSvc && (!mConnInfo->GetRoutedHost().IsEmpty() || mConnInfo->IsHttp3()) &&
       !mDontRetryWithDirectRoute) {
     RefPtr<nsHttpConnectionInfo> ci;
     mConnInfo->CloneAsDirectRoute(getter_AddRefs(ci));
     mConnInfo = ci;
     if (mRequestHead) {
       DebugOnly<nsresult> rv =
           mRequestHead->SetHeader(nsHttp::Alternate_Service_Used, "0"_ns);
       MOZ_ASSERT(NS_SUCCEEDED(rv));