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