'cURL error 61: Error while processing content unencoding: incorrect header check (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
We encountered a problem. We didn’t changed anything in the project.(laravel v8.x) We turned a backup version from 2mths before to check if the problem is on our side. Request https://geocode.search.hereapi.com/v1/geocode?apikey=KEY&q=Nysa sent by Postman/browser was working with every „q” parameter. But since yesterday the problem occured: : cURL error 61: Error while processing content unencoding: incorrect header check (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) ) for https://geocode.search.hereapi.com/v1/geocode?apikey=KEY&q=Krak%C3%B3w for parameter q=Kraków. On the other hand q=Lesko is working without problems, but q=Nysa is not working. We Wonder why some of q are working and some are not. Is it a global problem on Here level? Best regards,
Solution 1:[1]
I guess the here maps api is broken, because i receive the same error via the Laravel Http client since Feb 17, 2022 12:51:50 PM UTC.
When firing the here maps autocomplete api (via insomnia) directly with the same request, inconsistent results are returned: first request works, the following ones fail with the following error messsage "Error: Unrecognized or bad HTTP Content or Transfer-Encoding".
UPDATE:
After more investigation, i realized that all requests work perfectly fine with postman and curl, since they automatically set the "Accept-Encoding: gzip" header in the request.
Insomnia does not seem to do it. https://github.com/Kong/insomnia/issues/1025 https://github.com/Kong/insomnia/issues/2047
When adding the header to the insomnia requests the endpoint seems to return consistently a successful response.
This seems to be also true for the Http Client of laravel v8.x. if you add "Accept-Encoding: gzip", the requests work fine again.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
