0017-00000279

问题描述

x-oss-forbid-overwrite请求头不合法,只能是truefalse。

问题原因

x-oss-forbid-overwrite请求头不合法,只能是truefalse。

问题示例

PUT /test.txt HTTP/1.1
Host: test.oss-cn-zhangjiakou.aliyuncs.com
User-Agent: aliyun-sdk-python/2.6.0(Windows/7/AMD64;3.7.0)
Accept: */*
Connection: keep-alive
Content-Type: text/plain
date: Tue, 04 Dec 2018 15:56:37 GMT
authorization: OSS qn6qrrqxo2oawuk53otf****:kZoYNv66bsmc10+dcGKw5x2P****
Transfer-Encoding: chunked
x-oss-forbid-overwrite:abc

PutObject为例,x-oss-forbid-overwrite取值为abc,不满足取值要求。

解决方案

确保x-oss-forbid-overwrite取值正确,只能是truefalse。以PutObject为例,通过x-oss-forbid-overwrite指定PutObject操作时是否覆盖同名Object(第10行)。

PUT /test.txt HTTP/1.1
Host: test.oss-cn-zhangjiakou.aliyuncs.com
User-Agent: aliyun-sdk-python/2.6.0(Windows/7/AMD64;3.7.0)
Accept: */*
Connection: keep-alive
Content-Type: text/plain
date: Tue, 04 Dec 2018 15:56:37 GMT
authorization: OSS qn6qrrqxo2oawuk53otf****:kZoYNv66bsmc10+dcGKw5x2P****
Transfer-Encoding: chunked
x-oss-forbid-overwrite:true

相关文档

PutObject