Bug 1337721 - Part 1, preserve the channel priority after redirect. r=mayhemer draft
authorShih-Chiang Chien <schien@mozilla.com>
Fri, 10 Feb 2017 10:45:28 +0800
changeset 487770 ec26484daa2684313990f54e4d579fe6b08daaa3
parent 487769 47725823427b20c6229d0e1fa690972b90de7efe
child 487771 4a32499e62a9c3f9292311a3974d5759bf5a579e
push id46318
push userschien@mozilla.com
push dateWed, 22 Feb 2017 02:03:33 +0000
reviewersmayhemer
bugs1337721
milestone54.0a1
Bug 1337721 - Part 1, preserve the channel priority after redirect. r=mayhemer MozReview-Commit-ID: 14rIrhOcXXK
netwerk/protocol/http/HttpBaseChannel.cpp
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -3243,16 +3243,22 @@ HttpBaseChannel::SetupReplacementChannel
                                     oldAcceptValue,
                                     false);
     }
   }
 
   // share the request context - see bug 1236650
   httpChannel->SetRequestContextID(mRequestContextID);
 
+  // Preserve the loading order
+  nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(newChannel);
+  if (p) {
+    p->SetPriority(mPriority);
+  }
+
   if (httpInternal) {
     // Convey third party cookie, conservative, and spdy flags.
     httpInternal->SetThirdPartyFlags(mThirdPartyFlags);
     httpInternal->SetAllowSpdy(mAllowSpdy);
     httpInternal->SetAllowAltSvc(mAllowAltSvc);
     httpInternal->SetBeConservative(mBeConservative);
 
     RefPtr<nsHttpChannel> realChannel;