Author: atsushi
Date: 2008-02-14 23:38:25 -0500 (Thu, 14 Feb 2008)
New Revision: 95728
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel/ChangeLog
trunk/olive/class/System.ServiceModel/System.ServiceModel/EndpointAddress.cs
trunk/olive/class/System.ServiceModel/Test/System.ServiceModel/ChangeLog
trunk/olive/class/System.ServiceModel/Test/System.ServiceModel/EndpointAddressTest.cs
Log:
2008-02-15 Atsushi Enomoto <[EMAIL PROTECTED]>
* EndpointAddress.cs : reject relative Uri.
* EndpointAddressTest.cs : test for rejecting relative Uri.
Modified: trunk/olive/class/System.ServiceModel/System.ServiceModel/ChangeLog
===================================================================
--- trunk/olive/class/System.ServiceModel/System.ServiceModel/ChangeLog
2008-02-15 03:33:16 UTC (rev 95727)
+++ trunk/olive/class/System.ServiceModel/System.ServiceModel/ChangeLog
2008-02-15 04:38:25 UTC (rev 95728)
@@ -1,3 +1,7 @@
+2008-02-15 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * EndpointAddress.cs : reject relative Uri.
+
2008-02-14 Atsushi Enomoto <[EMAIL PROTECTED]>
* ChannelFactory_1.cs : populate ClientOperations before applying
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel/EndpointAddress.cs
===================================================================
---
trunk/olive/class/System.ServiceModel/System.ServiceModel/EndpointAddress.cs
2008-02-15 03:33:16 UTC (rev 95727)
+++
trunk/olive/class/System.ServiceModel/System.ServiceModel/EndpointAddress.cs
2008-02-15 04:38:25 UTC (rev 95728)
@@ -64,14 +64,8 @@
static XmlSchema schema;
public EndpointAddress (string uri)
- : this (new Uri (uri)) {}
-
- EndpointAddress (Uri uri)
+ : this (new Uri (uri), new AddressHeader [0])
{
- if (uri == null)
- throw new ArgumentNullException ();
- this.address = uri;
- headers = new AddressHeaderCollection (new
AddressHeader [0]);
}
public EndpointAddress (Uri uri, params AddressHeader []
headers)
@@ -90,7 +84,9 @@
XmlDictionaryReader extensionReader)
{
if (uri == null)
- throw new ArgumentNullException ();
+ throw new ArgumentNullException ("uri");
+ if (!uri.IsAbsoluteUri)
+ throw new ArgumentException ("The argument uri
must be absolute");
this.address = uri;
this.identity = identity;
this.headers = headers;
Modified:
trunk/olive/class/System.ServiceModel/Test/System.ServiceModel/ChangeLog
===================================================================
--- trunk/olive/class/System.ServiceModel/Test/System.ServiceModel/ChangeLog
2008-02-15 03:33:16 UTC (rev 95727)
+++ trunk/olive/class/System.ServiceModel/Test/System.ServiceModel/ChangeLog
2008-02-15 04:38:25 UTC (rev 95728)
@@ -1,3 +1,7 @@
+2008-02-15 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * EndpointAddressTest.cs : test for rejecting relative Uri.
+
2007-08-19 Atsushi Enomoto <[EMAIL PROTECTED]>
* ClientCredentialsSecurityTokenManagerTest.cs
Modified:
trunk/olive/class/System.ServiceModel/Test/System.ServiceModel/EndpointAddressTest.cs
===================================================================
---
trunk/olive/class/System.ServiceModel/Test/System.ServiceModel/EndpointAddressTest.cs
2008-02-15 03:33:16 UTC (rev 95727)
+++
trunk/olive/class/System.ServiceModel/Test/System.ServiceModel/EndpointAddressTest.cs
2008-02-15 04:38:25 UTC (rev 95728)
@@ -84,6 +84,13 @@
}
[Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void ConstructorRelativeUri ()
+ {
+ new EndpointAddress (new Uri (String.Empty,
UriKind.RelativeOrAbsolute));
+ }
+
+ [Test]
public void Headers ()
{
EndpointAddress e = new EndpointAddress ("urn:foo");
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches