mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00
Bug 679090 - Disable IPv6 for backup connections to workaround problems about broken IPv6 connectivity; f=mcmanus r=biesi
This commit is contained in:
parent
3c6c1791d8
commit
567cdedfaa
@ -778,6 +778,10 @@ pref("network.http.qos", 0);
|
||||
// connection.
|
||||
pref("network.http.connection-retry-timeout", 250);
|
||||
|
||||
// Disable IPv6 for backup connections to workaround problems about broken
|
||||
// IPv6 connectivity.
|
||||
pref("network.http.fast-fallback-to-IPv4", false);
|
||||
|
||||
// default values for FTP
|
||||
// in a DSCP environment this should be 40 (0x28, or AF11), per RFC-4594,
|
||||
// Section 4.8 "High-Throughput Data Service Class", and 80 (0x50, or AF22)
|
||||
|
@ -1368,7 +1368,7 @@ nsHalfOpenSocket::SetupStreams(nsISocketTransport **transport,
|
||||
// IPv6 on the backup connection gives them a much better user experience
|
||||
// with dual-stack hosts, though they still pay the 250ms delay for each new
|
||||
// connection. This strategy is also known as "happy eyeballs".
|
||||
if (isBackup)
|
||||
if (isBackup && gHttpHandler->FastFallbackToIPv4())
|
||||
tmpFlags |= nsISocketTransport::DISABLE_IPV6;
|
||||
|
||||
socketTransport->SetConnectionFlags(tmpFlags);
|
||||
|
@ -170,6 +170,7 @@ nsHttpHandler::nsHttpHandler()
|
||||
, mCapabilities(NS_HTTP_ALLOW_KEEPALIVE)
|
||||
, mProxyCapabilities(NS_HTTP_ALLOW_KEEPALIVE)
|
||||
, mReferrerLevel(0xff) // by default we always send a referrer
|
||||
, mFastFallbackToIPv4(PR_FALSE)
|
||||
, mIdleTimeout(10)
|
||||
, mMaxRequestAttempts(10)
|
||||
, mMaxRequestDelay(10)
|
||||
@ -898,6 +899,12 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
|
||||
mIdleSynTimeout = (PRUint16) NS_CLAMP(val, 0, 3000);
|
||||
}
|
||||
|
||||
if (PREF_CHANGED(HTTP_PREF("fast-fallback-to-IPv4"))) {
|
||||
rv = prefs->GetBoolPref(HTTP_PREF("fast-fallback-to-IPv4"), &cVar);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
mFastFallbackToIPv4 = cVar;
|
||||
}
|
||||
|
||||
if (PREF_CHANGED(HTTP_PREF("version"))) {
|
||||
nsXPIDLCString httpVersion;
|
||||
prefs->GetCharPref(HTTP_PREF("version"), getter_Copies(httpVersion));
|
||||
|
@ -107,7 +107,8 @@ public:
|
||||
PRUint32 PhishyUserPassLength() { return mPhishyUserPassLength; }
|
||||
PRUint8 GetQoSBits() { return mQoSBits; }
|
||||
PRUint16 GetIdleSynTimeout() { return mIdleSynTimeout; }
|
||||
|
||||
PRBool FastFallbackToIPv4() { return mFastFallbackToIPv4; }
|
||||
|
||||
PRBool IsPersistentHttpsCachingEnabled() { return mEnablePersistentHttpsCaching; }
|
||||
|
||||
PRBool PromptTempRedirect() { return mPromptTempRedirect; }
|
||||
@ -259,6 +260,8 @@ private:
|
||||
PRUint8 mProxyCapabilities;
|
||||
PRUint8 mReferrerLevel;
|
||||
|
||||
PRPackedBool mFastFallbackToIPv4;
|
||||
|
||||
PRUint16 mIdleTimeout;
|
||||
PRUint16 mMaxRequestAttempts;
|
||||
PRUint16 mMaxRequestDelay;
|
||||
|
Loading…
x
Reference in New Issue
Block a user