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)
.....

2 Answers
0
Accepted Answer

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],
]);
answered 5 years ago
0

Thanks for the tip, it worked.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions