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

已提问 5 年前532 查看次数
2 回答
0
已接受的回答

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],
]);
已回答 5 年前
0

Thanks for the tip, it worked.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容