全部產品
Search
文件中心

Object Storage Service:0033-00000001

更新時間:Jun 08, 2024

問題描述

請求體XML結構不合法。

問題原因

您發起PutBucketReferer請求配置防盜鏈,但是請求體XML結構不合法或者XML根節點不是RefererConfiguration

問題樣本

以下請求體XML結構中缺少閉合標籤</RefererConfiguration>,導致請求錯誤。

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>

解決方案

在請求體XML結構中補充閉合標籤</RefererConfiguration>

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>

相關文檔