linux-packaging-mono/mcs/class/System.Net.Http/HttpRequestMessage.Mono.cs
Xamarin Public Jenkins (auto-signing) d213358eb3 Imported Upstream version 6.4.0.183
Former-commit-id: 85d93be5537556349ef364365576dccf5d99b797
2019-08-28 08:43:56 +00:00

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);
}
}
}