Problem description
The value of the ResponseVary node in the cross-origin resource sharing (CORS) XML configuration is invalid.
Causes
This error occurs if you call the PutBucketCors operation to configure CORS rules for a bucket and the value of the ResponseVary node in your XML configuration is not a valid Boolean value.
Examples
For example, you initiate the following request:
PUT /?cors HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Length: 186
Date: Fri, 04 May 2012 03:21:12 GMT
Authorization: OSS qn6q**************:77Dv****************
<?xml version="1.0" encoding="UTF-8"?>
<CORS>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>Authorization</AllowedHeader>
</CORSRule>
<ResponseVary>0</ResponseVary>
</CORS>The request fails because the value of the ResponseVary node is invalid. The value must be true or false.
Solutions
Ensure that the XML configuration that you submit in the PutBucketCors request is valid.
PUT /?cors HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Length: 186
Date: Fri, 04 May 2012 03:21:12 GMT
Authorization: OSS qn6q**************:77Dv****************
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>Authorization</AllowedHeader>
</CORSRule>
<ResponseVary>false</ResponseVary>
</CORSConfiguration>References
该文章对您有帮助吗?