зеркало из https://github.com/mozilla/pjs.git
fixes bug 105292 - Mozilla is sending an Accept-encoding for deflate and
compress but doesn't support it [make timesofindia.com load again!] r=dougt sr=bzbarsky
This commit is contained in:
Родитель
cfbada2cd9
Коммит
ec27893e04
|
@ -45,7 +45,7 @@
|
||||||
class nsIURI;
|
class nsIURI;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// The nsBasicAuth class produces HTTP Basic-auth responses for a username/
|
// The nsHttpBasicAuth class produces HTTP Basic-auth responses for a username/
|
||||||
// (optional)password pair, BASE64("user:pass").
|
// (optional)password pair, BASE64("user:pass").
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -59,4 +59,4 @@ public:
|
||||||
virtual ~nsHttpBasicAuth();
|
virtual ~nsHttpBasicAuth();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // nsHttpBasicAuth_h__
|
#endif // !nsHttpBasicAuth_h__
|
||||||
|
|
|
@ -496,6 +496,7 @@ nsHttpChannel::ApplyContentConversions()
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
nsCOMPtr<nsIStreamListener> converter;
|
nsCOMPtr<nsIStreamListener> converter;
|
||||||
nsAutoString from = NS_ConvertASCIItoUCS2(val);
|
nsAutoString from = NS_ConvertASCIItoUCS2(val);
|
||||||
|
ToLowerCase(from);
|
||||||
rv = serv->AsyncConvertData(from.get(),
|
rv = serv->AsyncConvertData(from.get(),
|
||||||
NS_LITERAL_STRING("uncompressed").get(),
|
NS_LITERAL_STRING("uncompressed").get(),
|
||||||
mListener,
|
mListener,
|
||||||
|
@ -1673,8 +1674,7 @@ nsHttpChannel::GetCredentials(const char *challenges,
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCAutoString realm;
|
nsCAutoString realm;
|
||||||
rv = ParseRealm(challenge.get(), realm);
|
ParseRealm(challenge.get(), realm);
|
||||||
if (NS_FAILED(rv)) return rv;
|
|
||||||
|
|
||||||
const char *host;
|
const char *host;
|
||||||
nsCAutoString path;
|
nsCAutoString path;
|
||||||
|
@ -1848,7 +1848,7 @@ nsHttpChannel::GetUserPassFromURI(PRUnichar **user,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
void
|
||||||
nsHttpChannel::ParseRealm(const char *challenge, nsACString &realm)
|
nsHttpChannel::ParseRealm(const char *challenge, nsACString &realm)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
|
|
@ -121,7 +121,7 @@ private:
|
||||||
nsresult SelectChallenge(const char *challenges, nsAFlatCString &challenge, nsIHttpAuthenticator **);
|
nsresult SelectChallenge(const char *challenges, nsAFlatCString &challenge, nsIHttpAuthenticator **);
|
||||||
nsresult GetAuthenticator(const char *scheme, nsIHttpAuthenticator **);
|
nsresult GetAuthenticator(const char *scheme, nsIHttpAuthenticator **);
|
||||||
void GetUserPassFromURI(PRUnichar **user, PRUnichar **pass);
|
void GetUserPassFromURI(PRUnichar **user, PRUnichar **pass);
|
||||||
nsresult ParseRealm(const char *challenge, nsACString &realm);
|
void ParseRealm(const char *challenge, nsACString &realm);
|
||||||
nsresult PromptForUserPass(const char *host, PRInt32 port, PRBool proxyAuth, const char *realm, PRUnichar **user, PRUnichar **pass);
|
nsresult PromptForUserPass(const char *host, PRInt32 port, PRBool proxyAuth, const char *realm, PRUnichar **user, PRUnichar **pass);
|
||||||
void SetAuthorizationHeader(nsHttpAuthCache *, nsHttpAtom header, const char *host, PRInt32 port, const char *path, PRUnichar **user, PRUnichar **pass);
|
void SetAuthorizationHeader(nsHttpAuthCache *, nsHttpAtom header, const char *host, PRInt32 port, const char *path, PRUnichar **user, PRUnichar **pass);
|
||||||
void AddAuthorizationHeaders();
|
void AddAuthorizationHeaders();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче