Fixed a misuse of the HttpClient headers and related tests