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개 답변
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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠