- Issue created by @torotil
I’m using drupal_http_request() to make API calls. Some APIs encode their responses and thus my code has to deal with encoded values. This seems like something drupal_http_request() should deal with. It doesn’t send a Accept-Encoding header which means that tells servers it accepts any encoding:
If no Accept-Encoding header field is in the request, any content coding is considered acceptable by the user agent.
— https://www.rfc-editor.org/rfc/rfc9110.html#section-12.5.3-10.1
Make a HTTP request to a server that encodes its responses: See that the returned $response->data is encoded.
There are multiple options to handle this:
Accept-Encoding: identityAccept-Encoding: gzip, deflateDecide whether this is still worth implementing in D7.
None
If decompression is implemented the Accept-Encoding should be removed from the $response so that code working around this bug doesn’t attempt to decode a second time.
None
tbd
Active
7.0 ⚰️
Last updated