0033-00000008
Problem description
The value of the TruncatePath parameter in the hotlink protection configuration of the bucket is invalid.
Causes
You called PutBucketReferer to modify the hotlink protection configuration of the bucket. However, the TruncatePath parameter in the configuration that you submitted is not set to a valid Boolean value. As a result, the API returns the 0033-00000008 error code.
Examples
In the XML configuration of the following request, the value of the TruncatePath parameter is 32. This value is invalid and causes the request to fail.
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>true</AllowTruncateQueryString>
<TruncatePath>32</TruncatePath>
<RefererList>
<Referer>http://www.aliyun.com</Referer>
</RefererList>
</RefererConfiguration>
Solutions
Make sure that the value of the TruncatePath node in the XML configuration of the request body is valid. This node specifies whether to truncate the path part of the URL. Valid values:
-
true: truncates the path part of the URL in the Referer request header of the request.
-
false: does not truncate the path part of the URL in the Referer request header of the request. This is the default value.
The following example 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>true</AllowTruncateQueryString>
<TruncatePath>true</TruncatePath>
<RefererList>
<Referer>http://www.aliyun.com</Referer>
</RefererList>
</RefererConfiguration>