| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | namespace System.Net.Http |
| | | 5 | | { |
| | | 6 | | internal static partial class HttpUtilities |
| | | 7 | | { |
| | | 8 | | internal static bool IsSupportedScheme(string scheme) => |
| | 0 | 9 | | IsSupportedNonSecureScheme(scheme) || |
| | 0 | 10 | | IsSupportedSecureScheme(scheme); |
| | | 11 | | |
| | | 12 | | internal static bool IsSupportedNonSecureScheme(string scheme) => |
| | 0 | 13 | | string.Equals(scheme, "http", StringComparison.OrdinalIgnoreCase) || IsNonSecureWebSocketScheme(scheme); |
| | | 14 | | |
| | | 15 | | internal static bool IsSupportedSecureScheme(string scheme) => |
| | 0 | 16 | | string.Equals(scheme, "https", StringComparison.OrdinalIgnoreCase) || IsSecureWebSocketScheme(scheme); |
| | | 17 | | |
| | | 18 | | internal static bool IsNonSecureWebSocketScheme(string scheme) => |
| | 0 | 19 | | string.Equals(scheme, "ws", StringComparison.OrdinalIgnoreCase); |
| | | 20 | | |
| | | 21 | | internal static bool IsSecureWebSocketScheme(string scheme) => |
| | 0 | 22 | | string.Equals(scheme, "wss", StringComparison.OrdinalIgnoreCase); |
| | | 23 | | |
| | | 24 | | internal static bool IsSupportedProxyScheme(string scheme) => |
| | 0 | 25 | | string.Equals(scheme, "http", StringComparison.OrdinalIgnoreCase) || string.Equals(scheme, "https", StringCo |
| | | 26 | | |
| | | 27 | | internal static bool IsSocksScheme(string scheme) => |
| | 0 | 28 | | string.Equals(scheme, "socks5", StringComparison.OrdinalIgnoreCase) || |
| | 0 | 29 | | string.Equals(scheme, "socks4a", StringComparison.OrdinalIgnoreCase) || |
| | 0 | 30 | | string.Equals(scheme, "socks4", StringComparison.OrdinalIgnoreCase); |
| | | 31 | | } |
| | | 32 | | } |