[英]com.amazonaws.AmazonClientException: Data read has a different length than the expected
I am running into this problem in the course of working on a rest api that accepts PUT calls and then streams that contents of the push into S3 using the AWS S3 Java API. 我在使用一个接受PUT调用的REST API的过程中遇到了这个问题,然后使用AWS S3 Java API将推送的内容流式传输到S3中。
The error I am getting was this: 我得到的错误是这样的:
Caused by: com.amazonaws.AmazonClientException: Data read has a different length than the expected: dataLength=365;
由以下原因引起:com.amazonaws.AmazonClientException:读取的数据长度与预期的长度不同:dataLength = 365; expectedLength=366;
expectedLength = 366; includeSkipped=false;
includeSkipped = FALSE; in.getClass()=class org.duracloud.common.stream.ChecksumInputStream;
in.getClass()= class org.duracloud.common.stream.ChecksumInputStream; markedSupported=false;
markedSupported = FALSE; marked=0;
标记= 0; resetSinceLastMarked=false;
resetSinceLastMarked = FALSE; markCount=0;
markCount = 0; resetCount=0
resetCount = 0
I'm using aws-java-sdk 1.9.1. 我正在使用aws-java-sdk 1.9.1。
The problem has appeared since I upgraded from v.1.7.3 自从v.1.7.3升级以来,问题就出现了
虽然我不清楚aws sdk中到底是什么引起了问题,但我通过将content-type http头显式设置为默认值“ application / x-www-form-urlencoded”以外的其他内容来解决了该问题。由curl和jquery发送的值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.