d213358eb3
Former-commit-id: 85d93be5537556349ef364365576dccf5d99b797
23 lines
497 B
C#
23 lines
497 B
C#
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
|
|
|
|
// 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);
|
|
}
|
|
}
|
|
}
|