Part fix for bug 35956. HTTP now has an API to turn off automatic gunziping. r=rjc
git-svn-id: svn://10.0.0.236/trunk@72836 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
fc227477f9
commit
274afa85cf
@ -88,6 +88,17 @@ interface nsIHTTPChannel : nsIChannel
|
||||
|
||||
attribute PRBool AuthTriedWithPrehost;
|
||||
|
||||
/*
|
||||
We need a way to switch off gzip, etc. compression on the fly
|
||||
so that SaveAs would work as expected. Eventually this needs to
|
||||
go away since the content-conversion should occur only in URI-Loader
|
||||
land. See bug 43092
|
||||
|
||||
By default this value is TRUE.
|
||||
|
||||
*/
|
||||
attribute PRBool ApplyConversion;
|
||||
|
||||
readonly attribute PRBool UsingProxy;
|
||||
|
||||
readonly attribute nsIPrompt prompter;
|
||||
|
||||
@ -99,7 +99,8 @@ nsHTTPChannel::nsHTTPChannel(nsIURI* i_URL, nsHTTPHandler* i_Handler):
|
||||
mBufferMaxSize(0),
|
||||
mStatus(NS_OK),
|
||||
mPipeliningAllowed (PR_TRUE),
|
||||
mPipelinedRequest (nsnull)
|
||||
mPipelinedRequest (nsnull),
|
||||
mApplyConversion(PR_TRUE)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
NS_NewISupportsArray ( getter_AddRefs (mStreamAsFileObserverArray ) );
|
||||
@ -2428,6 +2429,20 @@ nsHTTPChannel::RemoveObserver(nsIStreamAsFileObserver *aObserver)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTTPChannel::GetApplyConversion(PRBool *aApplyConversion)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aApplyConversion);
|
||||
*aApplyConversion = mApplyConversion;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTTPChannel::SetApplyConversion(PRBool aApplyConversion)
|
||||
{
|
||||
mApplyConversion = aApplyConversion;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static NS_DEFINE_CID(kEventQServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
// nsISupports implementation
|
||||
|
||||
@ -190,6 +190,7 @@ protected:
|
||||
nsCOMPtr<nsISupports> mSecurityInfo;
|
||||
// Stream as file
|
||||
nsCOMPtr<nsISupportsArray> mStreamAsFileObserverArray;
|
||||
PRBool mApplyConversion;
|
||||
};
|
||||
|
||||
#include "nsIRunnable.h"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user