Bug 1337721 - Part 1, preserve the channel priority after redirect. r=mayhemer
MozReview-Commit-ID: 14rIrhOcXXK
--- 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;