Skip to content

Commit e6b8555

Browse files
grendellojonpryor
authored andcommitted
[Mono.Android] Don't optimize URL encoding (#1001)
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60473 In the case when the URL doesn't contain any query elements we optimized for speed and memory by not using `UrlBuilder` to do the encoding work on the URL. However, it causes problems with URLs that are sent pre-encoded. Remove the optimization and rely on `UrlBuilder` in all cases.
1 parent d628a98 commit e6b8555

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/Mono.Android/Xamarin.Android.Net/AndroidClientHandler.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,6 @@ string EncodeUrl (Uri url)
207207
if (url == null)
208208
return String.Empty;
209209

210-
if (String.IsNullOrEmpty (url.Query))
211-
return Uri.EscapeUriString (url.ToString ());
212-
213210
// UriBuilder takes care of encoding everything properly
214211
var bldr = new UriBuilder (url);
215212
if (url.IsDefaultPort)

0 commit comments

Comments
 (0)