diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs index b632761f1688c1a95b3a3308457a1106374b1377..0f849d3d3aa3dc2a9863a2ffcaf8dd4043540a30 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs @@ -1900,7 +1900,7 @@ private enum SettingId : ushort public async Task SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) { Debug.Assert(async); - if (NetEventSource.Log.IsEnabled()) Trace($"{request}"); + if (NetEventSource.Log.IsEnabled()) Trace($"Sending request: {request}"); try { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs index b9afa990d967f53d86fffd49d37a5bc945c34239..5c3fde8ea8fc627c6430aec167e1b462540506a0 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs @@ -140,7 +140,7 @@ public void Initialize(int streamId, int initialWindowSize) { StreamId = streamId; _availableCredit = initialWindowSize; - if (NetEventSource.Log.IsEnabled()) Trace($"{_request}, {nameof(initialWindowSize)}={initialWindowSize}"); + if (NetEventSource.Log.IsEnabled()) Trace($"{nameof(initialWindowSize)}={initialWindowSize}"); } public int StreamId { get; private set; } @@ -1029,6 +1029,7 @@ public async Task ReadResponseHeadersAsync(CancellationToken cancellationToken) { responseContent.SetStream(new Http2ReadStream(this)); } + if (NetEventSource.Log.IsEnabled()) Trace($"Received response: {_response}"); // Process Set-Cookie headers. if (_connection._pool.Settings._useCookies) diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs index 2e0047e6ce971f25543d85123f545556699108b7..3c053ca92620ed082874b252c1ef7bcb19d85f1b 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs @@ -203,6 +203,8 @@ public async Task SendAsync(HttpRequestMessage request, boo throw new HttpRequestException(SR.net_http_request_aborted, null, RequestRetryType.RetryOnConnectionFailure); } + if (NetEventSource.Log.IsEnabled()) Trace($"Sending request: {request}"); + Task responseTask = requestStream.SendAsync(cancellationToken); // null out requestStream to avoid disposing in finally block. It is now in charge of disposing itself. diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs index 498b04b0b135a0be544b7548be1212e563622638..64f9833e0aa237a3ae6a09b323d90e08f4dbe6cf 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs @@ -235,6 +235,7 @@ public async Task SendAsync(CancellationToken cancellationT // A read stream is required to finish up the request. responseContent.SetStream(new Http3ReadStream(this)); } + if (NetEventSource.Log.IsEnabled()) Trace($"Received response: {_response}"); // Process any Set-Cookie headers. if (_connection.Pool.Settings._useCookies)