安卓端利用post object方式,出现了MalformedPOSTRequest错误,由于和其他端保持统一,没有使用SDK
报文中的accessid和sign等已去除,这块没有问题,使用php、js都能上传成功,不知道为何安卓不行
抓取报文如下:
POST / HTTP/1.1
Content-Type: multipart/form-data; boundary=94a318c4-dd12-4dee-b7d8-51bede02f1e9
Content-Length: 39986
Host: loan-file.oss-cn-beijing.aliyuncs.com
Connection: Keep-Alive
Accept-Encoding: gzip
User-Agent: okhttp/2.5.0
--94a318c4-dd12-4dee-b7d8-51bede02f1e9
Content-Disposition: form-data; name="Callback"
Content-Transfer-Encoding: binary
Content-Type: text/plain; charset=utf-8
Content-Length: 312
11111......................(安全问题,已去除)
--94a318c4-dd12-4dee-b7d8-51bede02f1e9
Content-Disposition: form-data; name="OSSAccessKeyId"
Content-Transfer-Encoding: binary
Content-Type: text/plain; charset=utf-8
Content-Length: 16
11111111111(安全问题,已去除)
--94a318c4-dd12-4dee-b7d8-51bede02f1e9
Content-Disposition: form-data; name="policy"
Content-Transfer-Encoding: binary
Content-Type: text/plain; charset=utf-8
Content-Length: 120
1111111111111111(安全问题,已去除)
--94a318c4-dd12-4dee-b7d8-51bede02f1e9
Content-Disposition: form-data; name="key"
Content-Transfer-Encoding: binary
Content-Type: text/plain; charset=utf-8
Content-Length: 25
aaatitle1447916971206.jpg
--94a318c4-dd12-4dee-b7d8-51bede02f1e9
Content-Disposition: form-data; name="Signature"
Content-Transfer-Encoding: binary
Content-Type: text/plain; charset=utf-8
Content-Length: 28
111111111111(安全问题,已去除)
--94a318c4-dd12-4dee-b7d8-51bede02f1e9
Content-Disposition: form-data; name="file"; filename="title1447916971206.jpg"
Content-Transfer-Encoding: binary
Content-Type: image/jpeg
Content-Length: 38288
-------------文件流--------
--94a318c4-dd12-4dee-b7d8-51bede02f1e9
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。