From 77164021a2d553f0ee24d94a15c1729731fef9a0 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Thu, 23 Feb 2023 16:44:00 -0800 Subject: [PATCH] update small alignment items --- .../Azure.Sdk.Tools.TestProxy/RecordingHandler.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs index 5be9285e6a7..a8c7ac27d93 100644 --- a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs +++ b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs @@ -263,6 +263,8 @@ public async Task HandleRecordRequestAsync(string recordingId, HttpRequest incom entry.Response.Headers.Add(header.Key, values); } + outgoingResponse.Headers.Remove("Transfer-Encoding"); + if (entry.Response.Body?.Length > 0) { var bodyData = CompressionUtilities.CompressBody(entry.Response.Body, entry.Response.Headers); @@ -516,17 +518,11 @@ public async Task WriteBodyBytes(byte[] bodyData, int playbackResponseTime, Http byteCountSent+= chunk.Length; await outgoingResponse.Body.WriteAsync(chunk).ConfigureAwait(false); - //await outgoingResponse.WriteAsync(Encoding.UTF8.GetString(chunk)).ConfigureAwait(false); if (i != chunks.Length - 1) { Thread.Sleep(sleepLength); } - else - { - //await outgoingResponse.WriteAsync(Encoding.UTF8.GetString(chunk)).ConfigureAwait(false); - await outgoingResponse.Body.FlushAsync().ConfigureAwait(false); - } } }