Backed out changeset 6231a72d0557 (bug 1172884) for being the wrong patches landed a=backout

--HG--
extra : amend_source : 0c9d908d7b413bcf054c85aa5db901651cdc06a3
This commit is contained in:
Wes Kocher 2015-06-11 17:57:51 -07:00
Родитель a560c52ed5
Коммит 6783fcf01d
3 изменённых файлов: 4 добавлений и 20 удалений

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

@ -44,9 +44,6 @@ using namespace mozilla::ipc;
namespace mozilla {
namespace net {
extern bool
WillRedirect(const nsHttpResponseHead * response);
namespace {
const uint32_t kMaxFileDescriptorsPerMessage = 250;
@ -2189,11 +2186,8 @@ HttpChannelChild::OverrideWithSynthesizedResponse(nsAutoPtr<nsHttpResponseHead>&
nsIInputStream* aSynthesizedInput,
nsIStreamListener* aStreamListener)
{
// Intercepted responses should already be decoded. If its a redirect,
// however, we want to respect the encoding of the final result instead.
if (!WillRedirect(aResponseHead)) {
SetApplyConversion(false);
}
// Intercepted responses should already be decoded.
SetApplyConversion(false);
mResponseHead = aResponseHead;
mSynthesizedResponse = true;

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

@ -18,9 +18,6 @@
namespace mozilla {
namespace net {
extern bool
WillRedirect(const nsHttpResponseHead * response);
extern nsresult
DoAddCacheEntryHeaders(nsHttpChannel *self,
nsICacheEntry *entry,
@ -187,13 +184,6 @@ InterceptedChannelChrome::FinishSynthesizedResponse()
EnsureSynthesizedResponse();
// If the synthesized response is a redirect, then we want to respect
// the encoding of whatever is loaded as a result.
if (WillRedirect(mSynthesizedResponseHead.ref())) {
nsresult rv = mChannel->SetApplyConversion(mOldApplyConversion);
NS_ENSURE_SUCCESS(rv, rv);
}
mChannel->MarkIntercepted();
// First we ensure the appropriate metadata is set on the synthesized cache entry

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

@ -157,8 +157,6 @@ bool IsRedirectStatus(uint32_t status)
status == 307 || status == 308;
}
} // unnamed namespace
// We only treat 3xx responses as redirects if they have a Location header and
// the status code is in a whitelist.
bool
@ -168,6 +166,8 @@ WillRedirect(const nsHttpResponseHead * response)
response->PeekHeader(nsHttp::Location);
}
} // unnamed namespace
nsresult
StoreAuthorizationMetaData(nsICacheEntry *entry, nsHttpRequestHead *requestHead);