Author: gert
Date: 2007-02-24 05:02:33 -0500 (Sat, 24 Feb 2007)
New Revision: 73389
Modified:
trunk/mcs/class/System/System.Net/ChangeLog
trunk/mcs/class/System/System.Net/HttpWebRequest.cs
trunk/mcs/class/System/Test/System.Net/ChangeLog
trunk/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs
Log:
* HttpWebRequest.cs: Allow Proxy to be set to null on 2.0 profile.
* HttpWebRequestTest.cs: Added test for bug #80944.
Modified: trunk/mcs/class/System/System.Net/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Net/ChangeLog 2007-02-24 09:45:37 UTC (rev
73388)
+++ trunk/mcs/class/System/System.Net/ChangeLog 2007-02-24 10:02:33 UTC (rev
73389)
@@ -1,3 +1,7 @@
+2007-02-24 Gert Driesen <[EMAIL PROTECTED]>
+
+ * HttpWebRequest.cs: Allow Proxy to be set to null on 2.0 profile.
+
2007-02-18 Geoff Norton <[EMAIL PROTECTED]>
* AuthenticationManager.cs: Register the modules in the 2.0 profile
Modified: trunk/mcs/class/System/System.Net/HttpWebRequest.cs
===================================================================
--- trunk/mcs/class/System/System.Net/HttpWebRequest.cs 2007-02-24 09:45:37 UTC
(rev 73388)
+++ trunk/mcs/class/System/System.Net/HttpWebRequest.cs 2007-02-24 10:02:33 UTC
(rev 73389)
@@ -400,8 +400,10 @@
get { return proxy; }
set {
CheckRequestStarted ();
+#if ONLY_1_1
if (value == null)
throw new ArgumentNullException
("value");
+#endif
proxy = value;
servicePoint = null; // we may need a new one
Modified: trunk/mcs/class/System/Test/System.Net/ChangeLog
===================================================================
--- trunk/mcs/class/System/Test/System.Net/ChangeLog 2007-02-24 09:45:37 UTC
(rev 73388)
+++ trunk/mcs/class/System/Test/System.Net/ChangeLog 2007-02-24 10:02:33 UTC
(rev 73389)
@@ -1,3 +1,7 @@
+2007-02-24 Gert Driesen <[EMAIL PROTECTED]>
+
+ * HttpWebRequestTest.cs: Added test for bug #80944.
+
2007-02-08 Ilya Kharmatsky <ilyak -at- mainsoft.com>
* FileWebRequestTest.cs: Excluded not working under TARGET_JVM
Modified: trunk/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs
===================================================================
--- trunk/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs
2007-02-24 09:45:37 UTC (rev 73388)
+++ trunk/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs
2007-02-24 10:02:33 UTC (rev 73389)
@@ -33,6 +33,28 @@
public class HttpWebRequestTest
{
[Test]
+ public void Proxy_Null ()
+ {
+ HttpWebRequest req = (HttpWebRequest) WebRequest.Create
("http://www.google.com");
+ Assert.IsNotNull (req.Proxy, "#1");
+#if NET_2_0
+ req.Proxy = null;
+ Assert.IsNull (req.Proxy, "#2");
+#else
+ try {
+ req.Proxy = null;
+ Assert.Fail ("#2");
+ } catch (ArgumentNullException ex) {
+ Assert.AreEqual (typeof
(ArgumentNullException), ex.GetType (), "#3");
+ Assert.IsNull (ex.InnerException, "#4");
+ Assert.IsNotNull (ex.Message, "#5");
+ Assert.IsNotNull (ex.ParamName, "#6");
+ Assert.AreEqual ("value", ex.ParamName, "#7");
+ }
+#endif
+ }
+
+ [Test]
[Category("InetAccess")]
#if TARGET_JVM
[Ignore ("NMA - wrong cookies number returned")]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches