2019-07-26 19:53:28 +00:00
|
|
|
namespace System.Net.Http
|
|
|
|
{
|
|
|
|
partial class HttpRequestMessage
|
|
|
|
{
|
|
|
|
static bool IsAllowedAbsoluteUri (Uri uri)
|
|
|
|
{
|
|
|
|
if (!uri.IsAbsoluteUri)
|
|
|
|
return true;
|
|
|
|
|
|
|
|
#if WASM
|
|
|
|
if (uri.Scheme == "blob")
|
|
|
|
return true;
|
|
|
|
#endif
|
|
|
|
|
2019-08-28 08:43:56 +00:00
|
|
|
// 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;
|
|
|
|
|
2019-07-26 19:53:28 +00:00
|
|
|
return HttpUtilities.IsHttpUri (uri);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|