Closed akamsteeg closed 5 years ago
https://github.com/akamsteeg/AtleX.HaveIBeenPwned/blob/86e51b63b9bc87e072724f6f704e9cf8e3f1832d/src/AtleX.HaveIBeenPwned/Clients/Http/HttpHaveIBeenPwnedClient.cs#L454
HttpHaveIBeenPwnedClient.GetAsync(Uri, CancellationToken) resets the output stream even when no data was loaded. We only need to reset the stream when data was successfully loaded into the resulting MemoryStream.
HttpHaveIBeenPwnedClient.GetAsync(Uri, CancellationToken)
MemoryStream
https://github.com/akamsteeg/AtleX.HaveIBeenPwned/blob/86e51b63b9bc87e072724f6f704e9cf8e3f1832d/src/AtleX.HaveIBeenPwned/Clients/Http/HttpHaveIBeenPwnedClient.cs#L454
HttpHaveIBeenPwnedClient.GetAsync(Uri, CancellationToken)
resets the output stream even when no data was loaded. We only need to reset the stream when data was successfully loaded into the resultingMemoryStream
.