projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be11524
)
Use string.Replace for UriBuilder.set_Path
author
James Ko
<jamesqko@gmail.com>
Fri, 1 Jul 2016 13:42:50 +0000
(09:42 -0400)
committer
James Ko
<jamesqko@gmail.com>
Fri, 1 Jul 2016 13:42:50 +0000
(09:42 -0400)
Commit migrated from https://github.com/dotnet/corefx/commit/
0c80ffad824bea91be2afa39e0c49c56608e20e8
src/libraries/System.Private.Uri/src/System/UriBuilder.cs
patch
|
blob
|
history
diff --git
a/src/libraries/System.Private.Uri/src/System/UriBuilder.cs
b/src/libraries/System.Private.Uri/src/System/UriBuilder.cs
index
761ad2b
..
761c67b
100644
(file)
--- a/
src/libraries/System.Private.Uri/src/System/UriBuilder.cs
+++ b/
src/libraries/System.Private.Uri/src/System/UriBuilder.cs
@@
-241,7
+241,7
@@
namespace System
{
value = "/";
}
- _path = Uri.InternalEscapeString(
ConvertSlashes(value
));
+ _path = Uri.InternalEscapeString(
value.Replace('\\', '/'
));
_changed = true;
}
}
@@
-349,23
+349,6
@@
namespace System
// methods
- private string ConvertSlashes(string path)
- {
- StringBuilder sb = new StringBuilder(path.Length);
- char ch;
-
- for (int i = 0; i < path.Length; ++i)
- {
- ch = path[i];
- if (ch == '\\')
- {
- ch = '/';
- }
- sb.Append(ch);
- }
- return sb.ToString();
- }
-
public override bool Equals(object rparam)
{
if (rparam == null)