blob: 91f381915f1e6c72dc15e7332ac6c6db7e13a7f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
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);
}
}
}
|