[Mono-dev] [PATCH] Read System.Net proxy server address from environment

Michael Hutchinson m.j.hutchinson at gmail.com
Wed Nov 9 18:16:45 EST 2005

> +                                       //FIXME: does usesystemdefault
> or presence of address take precedence?
> Why not testing this now that you're on the case and make it work like
> it does in MS?

I've got onto Windows and done some testing on .NET 1.1, and it
appears the values are treated as follows:

1. First the value of "proxyaddress" is used. If it is not empty and
parses correctly as a URI, this address is used.
2. If the address was not already assigned and "usesystemdefault" is
true (blank == false), then address is loaded from the environment.
3. If this is empty, or parsing it fails, the address is left blank.

> -                                       } catch (Exception) {
> +                                       } catch (UriFormatException) {
> Do not change this. There might be other exceptions thrown.

Note the silent fallthrough on bad URI formats on .NET. I therefore
think that that catching Exception is overzealous, as if it does occur
that will be due to a bug.

Is it okay to commit now? I don't have a direct internet connection
here, so if someone could double-check that it definately works
without a proxy that would be nice.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: proxy_config_data.patch
Type: text/x-patch
Size: 2029 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20051109/f2dcd625/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proxy_config_load.patch
Type: text/x-patch
Size: 2205 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20051109/f2dcd625/attachment-0001.bin 

More information about the Mono-devel-list mailing list