Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackson Harper <jackson@novell.com>2004-02-11 22:35:10 +0300
committerJackson Harper <jackson@novell.com>2004-02-11 22:35:10 +0300
commiteaa188c2fe955cebc28b7ce103cc9cdfb07b32b8 (patch)
tree0250cb2e2e97ecbee843986595e62687a0a37d90 /mcs/class/System/System
parentce4af61c7191bcffa95865007962490d5e50d84f (diff)
* Uri.cs: If the relative uri passed to Uri (base_uri,
relative_uri) is an absolute uri do not combine the uris. The base uri is dropped. svn path=/trunk/mcs/; revision=22988
Diffstat (limited to 'mcs/class/System/System')
-rw-r--r--mcs/class/System/System/ChangeLog6
-rwxr-xr-xmcs/class/System/System/Uri.cs32
2 files changed, 22 insertions, 16 deletions
diff --git a/mcs/class/System/System/ChangeLog b/mcs/class/System/System/ChangeLog
index 2743360367c..89bb05066a4 100644
--- a/mcs/class/System/System/ChangeLog
+++ b/mcs/class/System/System/ChangeLog
@@ -1,3 +1,9 @@
+2004-02-11 Jackson Harper <jackson@ximian.com>
+
+ * Uri.cs: If the relative uri passed to Uri (base_uri,
+ relative_uri) is an absolute uri do not combine the uris. The base
+ uri is dropped.
+
2004-02-10 Jackson Harper <jackson@ximian.com>
* Uri.cs: Preserve the trailing / if there is one when reducing
diff --git a/mcs/class/System/System/Uri.cs b/mcs/class/System/System/Uri.cs
index 359eb8cbc5d..4102e37f8dd 100755
--- a/mcs/class/System/System/Uri.cs
+++ b/mcs/class/System/System/Uri.cs
@@ -112,25 +112,9 @@ namespace System
userEscaped = dontEscape;
- this.scheme = baseUri.scheme;
- this.host = baseUri.host;
- this.port = baseUri.port;
- this.userinfo = baseUri.userinfo;
- this.isUnc = baseUri.isUnc;
- this.isWindowsFilePath = baseUri.isWindowsFilePath;
- this.isUnixFilePath = baseUri.isUnixFilePath;
- this.isOpaquePart = baseUri.isOpaquePart;
-
if (relativeUri == null)
throw new NullReferenceException ("relativeUri");
- if (relativeUri == String.Empty) {
- this.path = baseUri.path;
- this.query = baseUri.query;
- this.fragment = baseUri.fragment;
- return;
- }
-
int pos = relativeUri.IndexOf (':');
if (pos != -1) {
@@ -149,6 +133,22 @@ namespace System
}
}
+ this.scheme = baseUri.scheme;
+ this.host = baseUri.host;
+ this.port = baseUri.port;
+ this.userinfo = baseUri.userinfo;
+ this.isUnc = baseUri.isUnc;
+ this.isWindowsFilePath = baseUri.isWindowsFilePath;
+ this.isUnixFilePath = baseUri.isUnixFilePath;
+ this.isOpaquePart = baseUri.isOpaquePart;
+
+ if (relativeUri == String.Empty) {
+ this.path = baseUri.path;
+ this.query = baseUri.query;
+ this.fragment = baseUri.fragment;
+ return;
+ }
+
// 8 fragment
pos = relativeUri.IndexOf ('#');
if (pos != -1) {