diff --git a/mail/components/preferences/connection.js b/mail/components/preferences/connection.js
index b072e2eed38..8cad2e208de 100644
--- a/mail/components/preferences/connection.js
+++ b/mail/components/preferences/connection.js
@@ -39,6 +39,11 @@ var gConnectionsDialog = {
beforeAccept: function ()
{
var proxyTypePref = document.getElementById("network.proxy.type");
+ if (proxyTypePref.value == 2) {
+ this.doAutoconfigURLFixup();
+ return true;
+ }
+
if (proxyTypePref.value != 1)
return true;
@@ -58,6 +63,7 @@ var gConnectionsDialog = {
proxyPortPref.value = httpProxyPortPref.value;
}
}
+
return true;
},
@@ -147,17 +153,15 @@ var gConnectionsDialog = {
pps.configureFromPAC(autoURL.value);
},
- writeAutoconfigURL: function ()
+ doAutoconfigURLFixup: function ()
{
var autoURL = document.getElementById("networkProxyAutoconfigURL");
+ var autoURLPref = document.getElementById("network.proxy.autoconfig_url");
var URIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"]
.getService(Components.interfaces.nsIURIFixup);
try {
- return URIFixup.createFixupURI(autoURL.value, 0).spec;
- }
- catch(ex) {
- }
- return undefined;
+ autoURLPref.value = autoURL.value = URIFixup.createFixupURI(autoURL.value, 0).spec;
+ } catch(ex) {}
},
readHTTPProxyServer: function ()
diff --git a/mail/components/preferences/connection.xul b/mail/components/preferences/connection.xul
index 4613d7da280..2bdb7563eaa 100644
--- a/mail/components/preferences/connection.xul
+++ b/mail/components/preferences/connection.xul
@@ -157,8 +157,7 @@
-
+