Bug 1171203 - Fix redirection limit underflow, don't count internal redirect to this limit, r=mcmanus

This commit is contained in:
Honza Bambas 2016-08-01 04:12:00 +02:00
parent 3f47f7f4b8
commit 14d285bdcd

View File

@ -2973,7 +2973,11 @@ HttpBaseChannel::SetupReplacementChannel(nsIURI *newURI,
httpChannel->SetAllowPipelining(mAllowPipelining);
httpChannel->SetAllowSTS(mAllowSTS);
// convey the new redirection limit
httpChannel->SetRedirectionLimit(mRedirectionLimit - 1);
// make sure we don't underflow
uint32_t redirectionLimit = mRedirectionLimit
? mRedirectionLimit - 1
: 0;
httpChannel->SetRedirectionLimit(redirectionLimit);
// convey the Accept header value
{