All Products
Search
Document Center

Object Storage Service:0019-00000009

Last Updated:Jul 21, 2023

Problem description

A required parameter is missing from the XML data in the body of the PutBucketWebSite request that is compatible with Amazon Simple Storage Service (S3).

Causes

The required Suffix parameter in the IndexDocument element is missing from the XML body of the S3-compatible PutBucketWebSite request. The S3-compatible PutBucketWebSite request requires the RedirectAllRequestsTo parameter or the Suffix parameter in the IndexDocument element. Object Storage Service (OSS) does not support RedirectAllRequestsTo. That means Suffix in the IndexDocument element must be specified.

Examples

For example, you initiate the following request:

PUT /?website HTTP/1.1
Date: GMT Date
Content-Length: ContentLength
Content-Type: application/xml
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Authorization: AWS SignatureValue
x-oss-s3-compat: true

<?xml version="1.0" encoding="UTF-8"?>
<Website xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <ErrorDocument>
      <Key>string</Key>
   </ErrorDocument>
</Website>

The error is returned for the sample request because the IndexDocument element is missing from the XML data in the request body.

Solutions

Make sure that the XML request body includes the Suffix parameter in the IndexDocument element.

PUT /?website HTTP/1.1
Date: GMT Date
Content-Length: ContentLength
Content-Type: application/xml
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Authorization: AWS SignatureValue
x-oss-s3-compat: true

<?xml version="1.0" encoding="UTF-8"?>
<WebsiteConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <IndexDocument>
        <Suffix>index.html</Suffix>
    </IndexDocument>
    <ErrorDocument>
        <Key>errorDocument.html</Key>
    </ErrorDocument>
</WebsiteConfiguration>

References