64 references to Settings
System.Net.Http (64)
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (1)
502TimeSpan drainTime = _connection._pool.Settings._maxResponseDrainTime;
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (12)
81_maxHttp11Connections = Settings._maxConnectionsPerServer; 365if (doRequestAuth && Settings._credentials != null) 367return AuthenticationHelper.SendWithRequestAuthAsync(request, async, Settings._credentials, Settings._preAuthenticate, this, cancellationToken); 385if (doRequestAuth && Settings._credentials != null) 387return AuthenticationHelper.SendWithNtConnectionAuthAsync(request, async, Settings._credentials, Settings._impersonationLevel, connection, this, cancellationToken); 669if (Settings._connectCallback != null) 671ValueTask<Stream> streamTask = Settings._connectCallback(new SocketsHttpConnectionContext(endPoint, initialRequest), cancellationToken); 740if (Settings._plaintextStreamFilter is null) 748ValueTask<Stream> streamTask = Settings._plaintextStreamFilter(new SocketsHttpPlaintextStreamFilterContext(stream, httpVersion, request), cancellationToken); 830private CancellationTokenSource GetConnectTimeoutCancellationTokenSource() => new CancellationTokenSource(Settings._connectTimeout);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (1)
87long queueStartingTimestamp = HttpTelemetry.Log.IsEnabled() || Settings._metrics!.RequestsQueueDuration.Enabled ? Stopwatch.GetTimestamp() : 0;
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionWaiter.cs (4)
22return HttpTelemetry.Log.IsEnabled() || pool.Settings._metrics!.RequestsQueueDuration.Enabled || Activity.Current?.Source == DiagnosticsHandler.s_activitySource 48pool.Settings._metrics!.RequestLeftQueue(request, pool, duration, versionMajor); 83pool.Settings._connectTimeout != Timeout.InfiniteTimeSpan && timeout > (int)pool.Settings._connectTimeout.TotalMilliseconds) // Do not override shorter ConnectTimeout
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (1)
214TimeSpan drainTime = _connection._pool.Settings._maxResponseDrainTime;
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (10)
141_hpackDecoder = new HPackDecoder(maxHeadersLength: pool.Settings.MaxResponseHeadersByteLength); 159_keepAlivePingDelay = TimeSpanToMs(_pool.Settings._keepAlivePingDelay); 160_keepAlivePingTimeout = TimeSpanToMs(_pool.Settings._keepAlivePingTimeout); 162_keepAlivePingPolicy = _pool.Settings._keepAlivePingPolicy; 213BinaryPrimitives.WriteUInt32BigEndian(_outgoingBuffer.AvailableSpan, (uint)_pool.Settings._initialHttp2StreamWindowSize); 1415HeaderEncodingSelector<HttpRequestMessage>? encodingSelector = _pool.Settings._requestHeaderEncodingSelector; 1524Encoding? protocolEncoding = _pool.Settings._requestHeaderEncodingSelector?.Invoke(":protocol", request); 1533if (_pool.Settings._useCookies) 1535string cookiesFromContainer = _pool.Settings._cookieContainer!.GetCookieHeader(request.RequestUri); 1539Encoding? cookieEncoding = _pool.Settings._requestHeaderEncodingSelector?.Invoke(KnownHeaders.Cookie.Name, request);
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (6)
106_headerBudgetRemaining = connection._pool.Settings.MaxResponseHeadersByteLength; 353}, this, _connection._pool.Settings._expect100ContinueTimeout, Timeout.InfiniteTimeSpan).ConfigureAwait(false)) 609throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _connection._pool.Settings.MaxResponseHeadersByteLength)); 704Encoding? valueEncoding = _connection._pool.Settings._responseHeaderEncodingSelector?.Invoke(descriptor.Name, _request); 1100if (_connection._pool.Settings._useCookies) 1102CookieHelper.ProcessReceivedCookies(_response, _connection._pool.Settings._cookieContainer!);
System\Net\Http\SocketsHttpHandler\Http2StreamWindowManager.cs (1)
25HttpConnectionSettings settings = connection._pool.Settings;
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (2)
287_pool.Settings._metrics!.RequestLeftQueue(request, Pool, duration, versionMajor: 3); 479await _clientControl.WriteAsync(_pool.Settings.Http3SettingsFrame, CancellationToken.None).ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (11)
76_headerBudgetRemaining = connection.Pool.Settings.MaxResponseHeadersByteLength; 255if (_connection.Pool.Settings._useCookies) 257CookieHelper.ProcessReceivedCookies(_response, _connection.Pool.Settings._cookieContainer!); 420if (_connection.Pool.Settings._expect100ContinueTimeout != Timeout.InfiniteTimeSpan) 423this, _connection.Pool.Settings._expect100ContinueTimeout, Timeout.InfiniteTimeSpan); 662if (_connection.Pool.Settings._useCookies) 664string cookiesFromContainer = _connection.Pool.Settings._cookieContainer!.GetCookieHeader(request.RequestUri); 667Encoding? valueEncoding = _connection.Pool.Settings._requestHeaderEncodingSelector?.Invoke(HttpKnownHeaderNames.Cookie, request); 715HeaderEncodingSelector<HttpRequestMessage>? encodingSelector = _connection.Pool.Settings._requestHeaderEncodingSelector; 908throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _connection.Pool.Settings.MaxResponseHeadersByteLength)); 1081Encoding? encoding = _connection.Pool.Settings._responseHeaderEncodingSelector?.Invoke(descriptor.Name, _request);
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (10)
365if (_pool.Settings._useCookies) 367cookiesFromContainer = _pool.Settings._cookieContainer!.GetCookieHeader(request.RequestUri); 421HeaderEncodingSelector<HttpRequestMessage>? encodingSelector = _pool.Settings._requestHeaderEncodingSelector; 590allowExpect100ToContinue, _pool.Settings._expect100ContinueTimeout, Timeout.InfiniteTimeSpan); 597_allowedReadLineBytes = _pool.Settings.MaxResponseHeadersByteLength; 835if (_pool.Settings._useCookies) 837CookieHelper.ProcessReceivedCookies(response, _pool.Settings._cookieContainer!); 1276Encoding? valueEncoding = _pool.Settings._responseHeaderEncodingSelector?.Invoke(descriptor.Name, _currentRequest!); 1330throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _pool.Settings.MaxResponseHeadersByteLength)); 2086if (!await responseStream.DrainAsync(_pool.Settings._maxResponseDrainSize).ConfigureAwait(false) ||
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (2)
59Debug.Assert(_pool.Settings._metrics is not null); 61SocketsHttpHandlerMetrics metrics = _pool.Settings._metrics;
System\Net\Http\SocketsHttpHandler\HttpContentReadStream.cs (3)
78bool drained = await DrainAsync(connection._pool.Settings._maxResponseDrainSize).ConfigureAwait(false); 84$"Connection drain failed when MaxResponseDrainSize={connection._pool.Settings._maxResponseDrainSize} bytes or MaxResponseDrainTime=={connection._pool.Settings._maxResponseDrainTime} exceeded");