Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Tool/SystemTestingTools/Internal/HttpCallInterceptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ private static async Task<HttpResponseMessage> FindStub(HttpRequestMessage reque
if (match.Exception != null)
throw match.Exception;

return await match.Response.Clone(); // we clone because if the response is used more than one time, the content stream has been read and can't be read again
var clonedResponse = await match.Response.Clone(); // we clone because if the response is used more than one time, the content stream has been read and can't be read again
var clonedRequest = await request.Clone();

clonedResponse.RequestMessage = clonedRequest;
return clonedResponse;
}
}
}