Skip to content

Commit

Permalink
fit/finish
Browse files Browse the repository at this point in the history
  • Loading branch information
scbedd committed Feb 1, 2023
1 parent d70dd48 commit 7327f0d
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,9 @@ public async Task HandleRecordRequestAsync(string recordingId, HttpRequest incom
throw new HttpException(HttpStatusCode.BadRequest, $"There is no active recording session under id {recordingId}.");
}

(RecordEntry entry, byte[] bytes) = await CreateEntryAsync(incomingRequest).ConfigureAwait(false);
var entry = entryTuple.Item1;
(RecordEntry entry, byte[] requestBody) = await CreateEntryAsync(incomingRequest).ConfigureAwait(false);

var upstreamRequest = CreateUpstreamRequest(incomingRequest, entryTuple.Item2);
var upstreamRequest = CreateUpstreamRequest(incomingRequest, requestBody);

HttpResponseMessage upstreamResponse = null;

Expand Down Expand Up @@ -471,7 +470,7 @@ public async Task HandlePlaybackRequest(string recordingId, HttpRequest incoming
}
}

public static async Task<Tuple<RecordEntry, byte[]>> CreateEntryAsync(HttpRequest request)
public static async Task<(RecordEntry, byte[])> CreateEntryAsync(HttpRequest request)
{
var entry = new RecordEntry();
entry.RequestUri = GetRequestUri(request).AbsoluteUri;
Expand All @@ -488,7 +487,7 @@ public static async Task<Tuple<RecordEntry, byte[]>> CreateEntryAsync(HttpReques
byte[] bytes = await ReadAllBytes(request.Body).ConfigureAwait(false);

entry.Request.Body = CompressionUtilities.DecompressBody(bytes, request.Headers);
return new Tuple<RecordEntry, byte[]>(entry, bytes);
return (entry, bytes);
}

#endregion
Expand Down

0 comments on commit 7327f0d

Please sign in to comment.