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
path: root/mcs
diff options
context:
space:
mode:
authorMarcos Henrich <marcos.henrich@xamarin.com>2015-09-04 07:36:27 +0300
committerMarcos Henrich <marcos.henrich@xamarin.com>2015-09-04 07:36:27 +0300
commita1b27833730eb60864aec9006641f6df6997901a (patch)
treecc0abd333a49924944c5a5abbadf6ef08d929dcf /mcs
parent85f33ffe2a27833e08f0bfc57e6d56c431bb835f (diff)
Fixes Uri.UserInfo with spaces.
Fixes #31172.
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/System/System/UriParseComponents.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/mcs/class/System/System/UriParseComponents.cs b/mcs/class/System/System/UriParseComponents.cs
index 2e1e3c5d485..593ef053eac 100644
--- a/mcs/class/System/System/UriParseComponents.cs
+++ b/mcs/class/System/System/UriParseComponents.cs
@@ -326,6 +326,14 @@ namespace System {
bool isEscapedChar = false;
var oldIndex = index;
+ // Spaces should be percentage encoded #31172
+ if (ch == ' ') {
+ if (sb == null)
+ sb = new StringBuilder ();
+ sb.Append ("%20");
+ continue;
+ }
+
if (ch == '%'){
if (!Uri.IsHexEncoding (part, index))
return false;