0017-00000901

Updated at:

Problem description

OSS does not allow you to customize response headers for anonymous GET requests.

Causes

You initiate a GetObject request that includes custom headers, such as response-content-disposition, as an anonymous user. However, anonymous users cannot query objects by calling the GetObject operation. To initiate a GetObject request that includes custom headers as an anonymous user, include the signature in the request. The following custom response headers are supported:

  • response-content-language

  • response-expires

  • response-cache-control

  • response-content-disposition

  • response-content-encoding

Sample problems

The response-content-disposition field is included in the URL request parameters to specify the response header, but the request is not signed.

GET /test.txt?response-content-disposition=attachment;filename=abc.txt HTTP/1.1
Host: tesx.oss-cn-zhangjiakou.aliyuncs.com
Date: Fri, 28 Dec 2018 09:41:55 GMT

Solutions

Include the signature in the request.

GET /test.txt?response-content-disposition=attachment;filename=abc.txt&&x-oss-signature-version=OSS2&x-oss-expires=1704370971&x-oss-access-key-id=LTAI****************&x-oss-signature=oePl**************************** HTTP/1.1
Host: tesx.oss-cn-zhangjiakou.aliyuncs.com
Date: Fri, 28 Dec 2018 09:41:55 GMT

References