diff -r 229683caa4c3 extensions/pref/system-pref/src/nsSystemPref.cpp --- a/extensions/pref/system-pref/src/nsSystemPref.cpp Sat Nov 08 08:35:54 2008 -0800 +++ b/extensions/pref/system-pref/src/nsSystemPref.cpp Wed Nov 12 00:08:38 2008 -0400 @@ -302,6 +302,18 @@ nsSystemPref::ReadSystemPref(const char mSysPrefService->GetCharPref(aPrefName, getter_Copies(strValue)); SYSPREF_LOG(("system value is %s\n", strValue.get())); + // Usually frontend applications for proxy settings store the proxy value + // prefixed by its protocol. Mozilla does not like that so we cut the protocol + // part off before set that. + if (!nsCString(aPrefName).Equals("network.proxy.autoconfig_url")) { + if (StringBeginsWith(strValue, NS_LITERAL_CSTRING("http://"))) + strValue.Cut(0, 7); + else if (StringBeginsWith(strValue, NS_LITERAL_CSTRING("https://"))) + strValue.Cut(0, 8); + else if (StringBeginsWith(strValue, NS_LITERAL_CSTRING("ftp://"))) + strValue.Cut(0, 6); + } + prefBranch->SetCharPref(aPrefName, strValue.get()); break; case nsIPrefBranch::PREF_INT: