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:
authorAtsushi Eno <atsushieno@gmail.com>2004-05-21 11:55:28 +0400
committerAtsushi Eno <atsushieno@gmail.com>2004-05-21 11:55:28 +0400
commitd911c8c4e84450031d043a3d4d99b9987f4e9259 (patch)
treeeda908744bdb9ac3651ef71c03dea77d4e016225 /mcs/class/System/System
parent3c53b46c3bd7560944992ed826106fe526188f07 (diff)
2004-05-21 Atsushi Enomoto <atsushi@ximian.com>
* Uri.cs : AbsoluteUri does not escape file URI string. ToString() should unescape every file uri. MS.NET.ToString() does not unescape '#' but it looks a bug. svn path=/trunk/mcs/; revision=27802
Diffstat (limited to 'mcs/class/System/System')
-rwxr-xr-xmcs/class/System/System/Uri.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/mcs/class/System/System/Uri.cs b/mcs/class/System/System/Uri.cs
index 02bb6c86e64..ddec91998ad 100755
--- a/mcs/class/System/System/Uri.cs
+++ b/mcs/class/System/System/Uri.cs
@@ -240,15 +240,18 @@ namespace System
}
// Properties
-
+
public string AbsolutePath {
get { return path; }
}
public string AbsoluteUri {
- get {
- if (cachedAbsoluteUri == null)
- cachedAbsoluteUri = GetLeftPart (UriPartial.Path) + query + fragment;
+ get {
+ if (cachedAbsoluteUri == null) {
+// cachedAbsoluteUri = GetLeftPart (UriPartial.Path) + query + fragment;
+ string qf = IsFile ? query + fragment : EscapeString (query + fragment);
+ cachedAbsoluteUri = GetLeftPart (UriPartial.Path) + qf;
+ }
return cachedAbsoluteUri;
}
}
@@ -665,10 +668,7 @@ namespace System
{
if (cachedToString != null)
return cachedToString;
- if (IsFile && !IsUnc)
- cachedToString = Unescape (AbsoluteUri);
- else
- cachedToString = AbsoluteUri;
+ cachedToString = Unescape (AbsoluteUri);
return cachedToString;
}
@@ -756,7 +756,7 @@ namespace System
s.Append (HexUnescape (str, ref i));
i--;
} else
- s.Append (c);
+ s.Append (c);
}
return s.ToString ();
}