Skip to content

Commit

Permalink
Allow file:// based Uri's to be used in HttpClient when the BaseAddre…
Browse files Browse the repository at this point in the history
…ss is set

Fixes https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/967582

Bumps the HttpClient part in mono/corefx at: mono/corefx@ee3acec

The test that would have caught this failure was disabled previously via:
mono@2f41175
  • Loading branch information
steveisok authored Aug 27, 2019
1 parent 8d42243 commit 580defd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion external/corefx
4 changes: 4 additions & 0 deletions mcs/class/System.Net.Http/HttpRequestMessage.Mono.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ static bool IsAllowedAbsoluteUri (Uri uri)
return true;
#endif

// Mono URI handling which does not distinguish between file and url absolute paths without scheme
if (uri.Scheme == Uri.UriSchemeFile && uri.OriginalString.StartsWith ("/", StringComparison.Ordinal))
return true;

return HttpUtilities.IsHttpUri (uri);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,7 @@ public void Send ()
Assert.AreEqual (response, client.SendAsync (request).Result, "#1");
}

[Test]
[Category ("NotWorking")]
[Test]
public void Send_BaseAddress ()
{
var mh = new HttpMessageHandlerMock ();
Expand Down

0 comments on commit 580defd

Please sign in to comment.