| | | 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 | | using System.Threading; |
| | | 5 | | using System.Security.Principal; |
| | | 6 | | |
| | | 7 | | namespace System.Net.Http |
| | | 8 | | { |
| | | 9 | | /// <summary> |
| | | 10 | | /// Central repository for default values used in http handler settings. Not all settings are relevant |
| | | 11 | | /// to or configurable by all handlers. |
| | | 12 | | /// </summary> |
| | | 13 | | internal static partial class HttpHandlerDefaults |
| | | 14 | | { |
| | | 15 | | public const int DefaultMaxAutomaticRedirections = 50; |
| | | 16 | | public const int DefaultMaxResponseDrainSize = 1024 * 1024; |
| | 0 | 17 | | public static readonly TimeSpan DefaultResponseDrainTimeout = TimeSpan.FromSeconds(2); |
| | | 18 | | public const int DefaultMaxResponseHeadersLength = 64; // Units in K (1024) bytes. |
| | | 19 | | public const DecompressionMethods DefaultAutomaticDecompression = DecompressionMethods.None; |
| | | 20 | | public const bool DefaultAutomaticRedirection = true; |
| | | 21 | | public const bool DefaultUseCookies = true; |
| | | 22 | | public const bool DefaultPreAuthenticate = false; |
| | | 23 | | public const ClientCertificateOption DefaultClientCertificateOption = ClientCertificateOption.Manual; |
| | | 24 | | public const bool DefaultUseProxy = true; |
| | | 25 | | public const bool DefaultUseDefaultCredentials = false; |
| | | 26 | | public const bool DefaultCheckCertificateRevocationList = false; |
| | | 27 | | public const TokenImpersonationLevel DefaultImpersonationLevel = TokenImpersonationLevel.None; |
| | 0 | 28 | | public static readonly TimeSpan DefaultPooledConnectionLifetime = Timeout.InfiniteTimeSpan; |
| | 0 | 29 | | public static readonly TimeSpan DefaultPooledConnectionIdleTimeout = TimeSpan.FromMinutes(1); |
| | 0 | 30 | | public static readonly TimeSpan DefaultExpect100ContinueTimeout = TimeSpan.FromSeconds(1); |
| | 0 | 31 | | public static readonly TimeSpan DefaultConnectTimeout = Timeout.InfiniteTimeSpan; |
| | | 32 | | } |
| | | 33 | | } |