Bug 1412015 P1 Propagate mRedirectCount and mInternalRedirectCount across all redirects. r=valentin

This commit is contained in:
Ben Kelly 2017-10-30 10:30:01 -04:00
Родитель 4c1bca4cb9
Коммит 871bdfbb8b
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -3600,6 +3600,7 @@ HttpBaseChannel::SetupReplacementChannel(nsIURI *newURI,
newTimedChannel->SetTimingEnabled(mTimingEnabled);
if (redirectFlags & nsIChannelEventSink::REDIRECT_INTERNAL) {
newTimedChannel->SetRedirectCount(mRedirectCount);
int8_t newCount = mInternalRedirectCount + 1;
newTimedChannel->SetInternalRedirectCount(
std::max(newCount, mInternalRedirectCount));
@ -3607,6 +3608,7 @@ HttpBaseChannel::SetupReplacementChannel(nsIURI *newURI,
int8_t newCount = mRedirectCount + 1;
newTimedChannel->SetRedirectCount(
std::max(newCount, mRedirectCount));
newTimedChannel->SetInternalRedirectCount(mInternalRedirectCount);
}
// If the RedirectStart is null, we will use the AsyncOpen value of the