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;
361
if (doRequestAuth &&
Settings
._credentials != null)
363
return AuthenticationHelper.SendWithRequestAuthAsync(request, async,
Settings
._credentials,
Settings
._preAuthenticate, this, cancellationToken);
381
if (doRequestAuth &&
Settings
._credentials != null)
383
return AuthenticationHelper.SendWithNtConnectionAuthAsync(request, async,
Settings
._credentials,
Settings
._impersonationLevel, connection, this, cancellationToken);
646
if (
Settings
._connectCallback != null)
648
ValueTask<Stream> streamTask =
Settings
._connectCallback(new SocketsHttpConnectionContext(endPoint, initialRequest), cancellationToken);
717
if (
Settings
._plaintextStreamFilter is null)
725
ValueTask<Stream> streamTask =
Settings
._plaintextStreamFilter(new SocketsHttpPlaintextStreamFilterContext(stream, httpVersion, request), cancellationToken);
807
private CancellationTokenSource GetConnectTimeoutCancellationTokenSource() => new CancellationTokenSource(
Settings
._connectTimeout);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (1)
81
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
41
pool.
Settings
._metrics!.RequestLeftQueue(request, pool, duration, versionMajor);
76
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);
1416
HeaderEncodingSelector<HttpRequestMessage>? encodingSelector = _pool.
Settings
._requestHeaderEncodingSelector;
1525
Encoding? protocolEncoding = _pool.
Settings
._requestHeaderEncodingSelector?.Invoke(":protocol", request);
1534
if (_pool.
Settings
._useCookies)
1536
string cookiesFromContainer = _pool.
Settings
._cookieContainer!.GetCookieHeader(request.RequestUri);
1540
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)
202
_pool.
Settings
._metrics!.RequestLeftQueue(request, Pool, duration, versionMajor: 3);
394
await _clientControl.WriteAsync(_pool.
Settings
.Http3SettingsFrame, CancellationToken.None).ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (11)
76
_headerBudgetRemaining = connection.Pool.
Settings
.MaxResponseHeadersByteLength;
230
if (_connection.Pool.
Settings
._useCookies)
232
CookieHelper.ProcessReceivedCookies(_response, _connection.Pool.
Settings
._cookieContainer!);
389
if (_connection.Pool.
Settings
._expect100ContinueTimeout != Timeout.InfiniteTimeSpan)
392
this, _connection.Pool.
Settings
._expect100ContinueTimeout, Timeout.InfiniteTimeSpan);
632
if (_connection.Pool.
Settings
._useCookies)
634
string cookiesFromContainer = _connection.Pool.
Settings
._cookieContainer!.GetCookieHeader(request.RequestUri);
637
Encoding? valueEncoding = _connection.Pool.
Settings
._requestHeaderEncodingSelector?.Invoke(HttpKnownHeaderNames.Cookie, request);
685
HeaderEncodingSelector<HttpRequestMessage>? encodingSelector = _connection.Pool.
Settings
._requestHeaderEncodingSelector;
878
throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _connection.Pool.
Settings
.MaxResponseHeadersByteLength));
1051
Encoding? encoding = _connection.Pool.
Settings
._responseHeaderEncodingSelector?.Invoke(descriptor.Name, _request);
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (10)
329
if (_pool.
Settings
._useCookies)
331
cookiesFromContainer = _pool.
Settings
._cookieContainer!.GetCookieHeader(request.RequestUri);
385
HeaderEncodingSelector<HttpRequestMessage>? encodingSelector = _pool.
Settings
._requestHeaderEncodingSelector;
552
allowExpect100ToContinue, _pool.
Settings
._expect100ContinueTimeout, Timeout.InfiniteTimeSpan);
559
_allowedReadLineBytes = _pool.
Settings
.MaxResponseHeadersByteLength;
797
if (_pool.
Settings
._useCookies)
799
CookieHelper.ProcessReceivedCookies(response, _pool.
Settings
._cookieContainer!);
1238
Encoding? valueEncoding = _pool.
Settings
._responseHeaderEncodingSelector?.Invoke(descriptor.Name, _currentRequest!);
1292
throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _pool.
Settings
.MaxResponseHeadersByteLength));
2048
if (!await responseStream.DrainAsync(_pool.
Settings
._maxResponseDrainSize).ConfigureAwait(false) ||
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (2)
41
Debug.Assert(pool.
Settings
._metrics is not null);
43
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");