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

Is clearing all (default) request headers set outside of HaveIBeenPwnedClient correct? #35

Closed akamsteeg closed 4 years ago

akamsteeg commented 4 years ago

In HaveIBeenPwnedClient.ConfigureHttpClient(HttpClient, HaveIBeenPwnedClientSettings) we're clearing all HTTP headers set outside of HaveIBeenPwnedClient and only set the ones we care about:

https://github.com/akamsteeg/AtleX.HaveIBeenPwned/blob/20215cc1c9904dd113973182f65cfaa55fc02df8/src/AtleX.HaveIBeenPwned/HaveIBeenPwnedClient.cs#L634-L645

That's not necessarly correct and we drop support for compressed responses with it.

Suggestion: Investigate the impact of not clearing the default response headers and the support of compressed responses.