projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
197498d
)
WebRequest.GetDefaultWebProxy() must not assume the type of the system proxy.
author
Jeffrey Stedfast
<jeff@xamarin.com>
Tue, 8 May 2012 22:59:13 +0000
(18:59 -0400)
committer
Jeffrey Stedfast
<jeff@xamarin.com>
Tue, 8 May 2012 22:59:13 +0000
(18:59 -0400)
mcs/class/System/System.Net/WebRequest.cs
patch
|
blob
|
history
diff --git
a/mcs/class/System/System.Net/WebRequest.cs
b/mcs/class/System/System.Net/WebRequest.cs
index b7bf9bc5c1fa23c2f9036fae6a89ed26bed70070..ad5a8e298d3bd609c5e781d080c5274df3b83231 100644
(file)
--- a/
mcs/class/System/System.Net/WebRequest.cs
+++ b/
mcs/class/System/System.Net/WebRequest.cs
@@
-235,9
+235,14
@@
namespace System.Net
ProxyElement pe = sec.Proxy;
- if ((pe.UseSystemDefault != ProxyElement.UseSystemDefaultValues.False) && (pe.ProxyAddress == null))
- p = (WebProxy) GetSystemWebProxy ();
- else
+ if ((pe.UseSystemDefault != ProxyElement.UseSystemDefaultValues.False) && (pe.ProxyAddress == null)) {
+ IWebProxy proxy = GetSystemWebProxy ();
+
+ if (!(proxy is WebProxy))
+ return proxy;
+
+ p = (WebProxy) proxy;
+ } else
p = new WebProxy ();
if (pe.ProxyAddress != null)