S3 throws error with latest curl in amz1 when getObject

0

Greetings!

Since updating curl to version curl-7.61.1-7.91.amzn1.i686 getObject(SDK) throws the following error when retrieving a file with Content-Encoding=UTF-8 and Content-type=text/html. Does not happen with previous version curl-7.53.1-16.86.amzn1.i686 which works flawless:

.....
exception 'Aws\S3\Exception\S3Exception' with message 'Error executing "GetObject" on "XXXXXXXX"; AWS HTTP error: cURL error 61: Unrecognized content encoding type. libcurl understands deflate, gzip content encodings. (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) (server): 200 OK (Request-ID: CB1F86A65ABDFF78) - '
....
exception 'GuzzleHttp\Exception\RequestException' with message 'cURL error 61: Unrecognized content encoding type. libcurl understands deflate, gzip content encodings. (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
.....

gefragt vor 5 Jahren532 Aufrufe
2 Antworten
0
Akzeptierte Antwort

I suffer form the same issue. I succeeded in getting this issue work by using 'http' => ['decode_content' => false], in the S3 client constructor, like

$client = new S3Client([
   'region'  => 'us-west-2',
   'version' => 'latest',
   'http'    => ['decode_content' => false],
]);
beantwortet vor 5 Jahren
0

Thanks for the tip, it worked.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen