Allow file:// based Uri's to be used in HttpClient when the BaseAddress is set
[mono-project.git] / mcs / class / System.Net.Http / HttpRequestMessage.Mono.cs
blob91f381915f1e6c72dc15e7332ac6c6db7e13a7f3
1 namespace System.Net.Http
3 partial class HttpRequestMessage
5 static bool IsAllowedAbsoluteUri (Uri uri)
7 if (!uri.IsAbsoluteUri)
8 return true;
10 #if WASM
11 if (uri.Scheme == "blob")
12 return true;
13 #endif
15 // Mono URI handling which does not distinguish between file and url absolute paths without scheme
16 if (uri.Scheme == Uri.UriSchemeFile && uri.OriginalString.StartsWith ("/", StringComparison.Ordinal))
17 return true;
19 return HttpUtilities.IsHttpUri (uri);