Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit c727d12

Browse files
authored
get connection from pool to send digest auth response (#26733)
* get connection from pool to send digest auth response * fix incorrect comment. * s/TBD/TODO/
1 parent 524f01c commit c727d12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/System.Net.Http/src/System/Net/Http/Managed/HttpProxyConnectionHandler.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ private async Task<HttpResponseMessage> SendWithProxyAsync(
8888

8989
if (credential != null)
9090
{
91+
// TODO #23156: Drain response before disposing.
9192
response.Dispose();
9293

9394
request.Headers.ProxyAuthorization = new AuthenticationHeaderValue(AuthenticationHelper.Basic,
@@ -111,8 +112,9 @@ private async Task<HttpResponseMessage> SendWithProxyAsync(
111112

112113
if (await AuthenticationHelper.TrySetDigestAuthToken(request, credential, digestResponse, HttpKnownHeaderNames.ProxyAuthorization).ConfigureAwait(false))
113114
{
115+
// TODO #23156: Drain response before disposing.
114116
response.Dispose();
115-
response = await _innerHandler.SendAsync(request, cancellationToken).ConfigureAwait(false);
117+
response = await GetConnectionAndSendAsync(request, proxyUri, cancellationToken).ConfigureAwait(false);
116118

117119
// Retry in case of nonce timeout in server.
118120
if (response.StatusCode == HttpStatusCode.ProxyAuthenticationRequired)

0 commit comments

Comments
 (0)