AWS re:Post Knowledge Center Feedback Survey
Help us improve the AWS re:Post Knowledge Center by sharing your feedback in a brief survey. Your input can influence how we create and update our content to better support your AWS journey.
【以下的问题经过翻译处理】 问候!
由于将 curl 更新到版本 curl-7.61.1-7.91.amzn1.i686 getObject(SDK) 在检索 Content-Encoding=UTF-8 和 Content-type=text/html 的文件时抛出以下错误(以前的版本不会发生 curl-7.53.1-16.86.amzn1.i686 完美无缺):
.....
异常“Aws\S3\Exception\S3Exception”,消息为“在“XXXXXXXX”上执行“GetObject”时出错; AWS HTTP 错误:cURL 错误 61:无法识别的内容编码类型。 libcurl 理解 deflate、gzip 内容编码。 (参见 http://curl.haxx.se/libcurl/c/libcurl-errors.html)(服务器):200 OK(请求 ID:CB1F86A65ABDFF78)-'
....
异常“GuzzleHttp\Exception\RequestException”,消息为“cURL 错误 61:无法识别的内容编码类型”。 libcurl 理解 deflate、gzip 内容编码。 (参见 http://curl.haxx.se/libcurl/c/libcurl-errors.html)
【以下的回答经过翻译处理】 我遇到了同样的问题。我通过在 S3 客户端构造函数中使用 'http' => ['decode_content' => false] 成功解决了这个问题,例如:
'http' => ['decode_content' => false]
$client = new S3Client([ 'region' => 'us-west-2', 'version' => 'latest', 'http' => ['decode_content' => false], ]);
您未登录。 登录 发布回答。
一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。