2010-06-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 22 Jun 2010 21:18:33 +0000 (21:18 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 22 Jun 2010 21:18:33 +0000 (21:18 -0000)
* Uri.cs: change of behavior un 4.0.
Fixes bug #602411.

svn path=/trunk/mcs/; revision=159377

mcs/class/System/System/ChangeLog
mcs/class/System/System/Uri.cs

index 775f961984effec17774fdd9b2d3fcc99661b874..94f8feadc96e030f74f1683d3cb03e036c76f833 100644 (file)
@@ -1,3 +1,8 @@
+2010-06-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * Uri.cs: change of behavior un 4.0.
+       Fixes bug #602411.
+
 2010-06-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
 
        * Uri.cs: fix serialization for relative URIs. Patch from Greg
index 81f2aaa5b7bdb62640505ae4f43f69a9786e6b2e..f94788cfd00c95ce6da8bd54684fa1a476c71d46 100644 (file)
@@ -327,7 +327,11 @@ namespace System {
                        
                        // par 5.2 step 6 a)
                        path = baseUri.path;
+#if NET_4_0
+                       if (relativeUri.Length > 0) {
+#else
                        if (relativeUri.Length > 0 || query.Length > 0) {
+#endif
                                pos = path.LastIndexOf ('/');
                                if (pos >= 0) 
                                        path = path.Substring (0, pos + 1);