mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 6231a72d0557 (bug 1172884) for being the wrong patches landed a=backout
This commit is contained in:
parent
e48c96f77c
commit
05609173bf
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user