Problem description
The value of the AllowTruncateQueryString node in the XML request body is invalid.
Causes
You sent a PutBucketReferer request to configure hotlink protection, but the value of the AllowTruncateQueryString node in the XML request body is not a valid Boolean value.
Examples
In the following request body XML configuration, the AllowTruncateQueryString node is set to 32. This is an invalid value that causes a request error.
PUT /?referer HTTP/1.1
Date: Fri, 24 Feb 2017 03:15:40 GMT
Content-Length: 322
Content-Type: application/xml
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS qn6q**************:77Dv****************
<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
<AllowEmptyReferer>false</AllowEmptyReferer>
<AllowTruncateQueryString>32</AllowTruncateQueryString>
<RefererList>
<Referer>http://www.aliyun.com</Referer>
</RefererList>
</RefererConfiguration>Solutions
Make sure that the value of the AllowTruncateQueryString node in the XML request body is correct. This node specifies whether to truncate the query string. Valid values are as follows:
true (default): Truncates the query string.
false: Does not truncate the query string.
The following code shows a valid request:
PUT /?referer HTTP/1.1
Date: Fri, 24 Feb 2017 03:15:40 GMT
Content-Length: 322
Content-Type: application/xml
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS qn6q**************:77Dv****************
<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
<AllowEmptyReferer>false</AllowEmptyReferer>
<AllowTruncateQueryString>false</AllowTruncateQueryString>
<RefererList>
<Referer>http://www.aliyun.com</Referer>
</RefererList>
</RefererConfiguration>References
该文章对您有帮助吗?