问题描述
x-oss-forbid-overwrite
请求头不合法,只能是true或false。
问题原因
x-oss-forbid-overwrite
请求头不合法,只能是true或false。
问题示例
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
取值正确,只能是true或false。以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
相关文档
文档内容是否对您有帮助?