X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem%2FSystem.Net%2FWebClient.cs;h=f1f64d794c09456b604dc8811aa370d7f656a27d;hb=3797b802e3b41c475e5fc9b5aeb09c484388c441;hp=41383ad3633da46acae3cff84e670d7d83b779db;hpb=8823e1fd4e61ee0c261191f60c99cf328a2c5389;p=mono.git diff --git a/mcs/class/System/System.Net/WebClient.cs b/mcs/class/System/System.Net/WebClient.cs index 41383ad3633..f1f64d794c0 100644 --- a/mcs/class/System/System.Net/WebClient.cs +++ b/mcs/class/System/System.Net/WebClient.cs @@ -291,8 +291,14 @@ namespace System.Net } - if (baseAddress == null && query == null) - return new Uri (path); + if (baseAddress == null && query == null) { + try { + return new Uri (path); + } + catch (System.UriFormatException ufe) { + return new Uri ("file://" + path); + } + } if (baseAddress == null) return new Uri (path + query, (query != null));