[wasm][http] Add support for Blob URLs (#42111)
authorKenneth Pouncey <kjpou@pt.lu>
Fri, 18 Sep 2020 17:28:02 +0000 (19:28 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Sep 2020 17:28:02 +0000 (12:28 -0500)
commitcf6b06b1d36d545e37b00bf1a6311b7fff33ff4e
treef8f6f56c011f58ea403c9944586c909e57034ac1
parent8933510b35aab8bb49f999586d4169a2cd6d920a
[wasm][http] Add support for Blob URLs (#42111)

* [wasm][http] Add support for Blob URLs

* Modify the string to read `Only 'http' 'https' and 'blob' schemes are allowed.` for browser

* Add more tests

* Add blob Uri marshal test

* Address review comments to add comments within code about intentions.

* Multiple review comments.

- Split Fact into theory instead of specific test for blob.
- Split large test into multiple tests as well as mark it Theory where appropriate.

* Rename

* Add message to other validations as well

* Change name

* Update src/libraries/System.Net.Http/src/Resources/Strings.resx

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Create partial classes for HttpUtilities to replace the proliferating use of TARGETS_BROWSER in the sources.

* Define and call `HttpUtilities.InvalidUriMessage` to provide the invalid message to be thrown.

* Fix CI Build

* Rename modules to follow current standards

Co-authored-by: Stephen Toub <stoub@microsoft.com>
src/libraries/System.Net.Http/src/Resources/Strings.resx
src/libraries/System.Net.Http/src/System.Net.Http.csproj
src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/HttpUtilities.Browser.cs [new file with mode: 0644]
src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs
src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestMessage.cs
src/libraries/System.Net.Http/src/System/Net/Http/HttpUtilities.AnyOS.cs [new file with mode: 0644]
src/libraries/System.Net.Http/src/System/Net/Http/HttpUtilities.cs
src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj
src/libraries/System.Private.Runtime.InteropServices.JavaScript/tests/System/Runtime/InteropServices/JavaScript/HelperMarshal.cs
src/libraries/System.Private.Runtime.InteropServices.JavaScript/tests/System/Runtime/InteropServices/JavaScript/Http/HttpRequestMessageTest.cs