ok2c commented on PR #698: URL: https://github.com/apache/httpcomponents-client/pull/698#issuecomment-3849740793
@strangelookingnerd You see, the server is not supposed to apply any content encoding other than those the client explicitly requests with `Accept-Encoding` header. If the server does so, it is in a direct violation of the protocol. The client may not be able to correctly decode content encoded with encoding it does not understand. As of version 5.6 HttpClient rejects such response messages as invalid because they basically are. If, for whatever reason, your application needs to be able to accept such responses, you must either disable the automatic content decompression and implement your own content processing logic or, alternatively, you may implement an execution interceptor that re-writes the `Content-Encoding` header and remove unexpected codecs from the header prior to passing it to the decompression interceptor in case you are sure they are harmless. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
