On 11/1/06, Gonzalo Paniagua Javier <[EMAIL PROTECTED]> wrote:
Please, commit.
Actually, I've made a few tweaks... I got onto Win32 and checked how the config code behaves. Both ConfigurationSettings.GetConfig and ConfigurationManager.GetSection should respect machine.config, but they don't on Mono 2.0. Given this, the latter is clearly the right choice for this patch to use, though it won't use machine.config settings till this is fixed. I'll follow it up on bugzilla. *However*, according to http://msdn2.microsoft.com/en-gb/library/kd3cf2ex.aspx, "If the defaultProxy element is empty, the proxy settings from Internet Explorer will be used. This behavior is different from version 1.1 of the .NET Framework.". Checking the default .NET 2.0 machine.config it doesn't even have a <system.net> section, so I've changed the default behaviour in this case to use system settings, and removed the <defaultProxy> section from the config file. This means that not using machine.config just yet won't matter for most users. Should I commit? -- Michael Hutchinson http://mjhutchinson.com
Index: data/net_2_0/machine.config =================================================================== --- data/net_2_0/machine.config (revision 67261) +++ data/net_2_0/machine.config (working copy) @@ -76,13 +76,6 @@ <add type="System.Net.DigestClient, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <add type="System.Net.NtlmClient, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </authenticationModules> - <defaultProxy> - <proxy - usesystemdefault = "true" - bypassonlocal = "true" - /> - <!-- proxyaddress can also be set --> - </defaultProxy> <webRequestModules> <add prefix="http" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <add prefix="https" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> Index: ChangeLog =================================================================== --- ChangeLog (revision 67261) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2006-11-02 Michael Hutchinson <[EMAIL PROTECTED]> + + * data/net_2_0/machine.config: defaultProxy section is no longer + necessary, so remove. + 2006-11-01 Jonathan Pryor <[EMAIL PROTECTED]> * configure.in: Add type checks for blkcnt_t, blksize_t, suseconds_t. Some
Index: System.Net/ChangeLog =================================================================== --- System.Net/ChangeLog (revision 67261) +++ System.Net/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2006-11-02 Michael Hutchinson <[EMAIL PROTECTED]> + + * WebRequest.cs: more closely follow MS behaviour: use system settings + unless told otherwise, and respect app.config. + 2006-11-01 Michael Hutchinson <[EMAIL PROTECTED]> * GlobalProxySelection.cs: Obsolete GlobalProxySelection under 2.0 Index: System.Net/WebRequest.cs =================================================================== --- System.Net/WebRequest.cs (revision 67261) +++ System.Net/WebRequest.cs (working copy) @@ -145,14 +145,13 @@ WebProxy p = null; #if CONFIGURATION_DEP - System.Configuration.Configuration config = ConfigurationManager.OpenMachineConfiguration (); - DefaultProxySection sec = config.GetSection ("system.net/defaultProxy") as DefaultProxySection; + DefaultProxySection sec = ConfigurationManager.GetSection ("system.net/defaultProxy") as DefaultProxySection; if (sec == null) - return GlobalProxySelection.GetEmptyWebProxy (); + return GetSystemWebProxy (); ProxyElement pe = sec.Proxy; - if ((pe.UseSystemDefault == ProxyElement.UseSystemDefaultValues.True) && (pe.ProxyAddress == null)) + if ((pe.UseSystemDefault != ProxyElement.UseSystemDefaultValues.False) && (pe.ProxyAddress == null)) p = (WebProxy) GetSystemWebProxy (); else p = new WebProxy ();
_______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list