文档

0016-00000502

更新时间:

问题描述

请求中position参数取值不合法。

问题原因

您发起了AppendObject请求,但是请求URL中的position参数不是合法的正整数。

问题示例

以下请求URL中position参数取值为test,不是合法的正整数。

POST /example?append&position=test HTTP/1.1 
Host: versioning-append.oss.aliyuncs.com 
Date: Tue, 09 Apr 2019 03:59:33 GMT
Content-Length: 3
Content-Type: application/octet-stream
Authorization: OSS bwo4j5l8d3j****:MCY5nnfgfJU/f3Xe0odqBtG5****

解决方案

确保请求中position参数取值正确,该参数用于指定追加的位置,取值格式为合法的正整数。

首次追加操作的position必须为0,后续追加操作的position是Object的当前大小。例如,第一次AppendObject请求指定position值为0,content-length是65536,则第二次AppendObject需要指定position为65536。

首次追加请求示例如下:

POST /example?append&position=0 HTTP/1.1 
Host: versioning-append.oss.aliyuncs.com 
Date: Tue, 09 Apr 2019 03:59:33 GMT
Content-Length: 3
Content-Type: application/octet-stream
Authorization: OSS bwo4j5l8d3j****:MCY5nnfgfJU/f3Xe0odqBtG5****

相关文档

AppendObject

  • 本页导读 (1)
文档反馈