akamsteeg / AtleX.HaveIBeenPwned

A fully async .NET Standard client library for the API of HaveIBeenPwned.com
https://www.nuget.org/packages/AtleX.HaveIBeenPwned/
MIT License
5 stars 0 forks source link

HttpHaveIBeenPwnedClient.GetAsync(Uri, CancellationToken) always creates a new MemoryStream, even when no data was loaded #21

Closed akamsteeg closed 5 years ago

akamsteeg commented 5 years ago

https://github.com/akamsteeg/AtleX.HaveIBeenPwned/blob/86e51b63b9bc87e072724f6f704e9cf8e3f1832d/src/AtleX.HaveIBeenPwned/Clients/Http/HttpHaveIBeenPwnedClient.cs#L428

HttpHaveIBeenPwnedClient.GetAsync(Uri, CancellationToken) always creates a new MemoryStream, even when no data was loaded. It should only create a new MemoryStream when the request to the HaveIBeenPwned.com API was successfull, otherwise it should return a Stream.Null.