All Products
Search
Document Center

Object Storage Service:0002-00000039

Last Updated:Apr 28, 2024

Issue description

The header and the URL request parameter cannot include a signature in a request at the same time.

Cause

You initiate a request that includes the Authorization header and a parameter, such as Expires, Signature, and OSSAccessKeyId, that is used for signature verification in the URL.

Example

The following code provides an example.

GET /oss.jpg?OSSAccessKeyId=nz2pc56s936****&Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv**** HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 06:38:30 GMT
Authorization: OSS qn6q**************:77Dv****************

Solution

You can use one of the following methods to initiate a request that includes a signature:

  • Include the signature information only in the header

GET /oss.jpg HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 06:38:30 GMT
Authorization: OSS qn6q**************:77Dv****************

For more information, see Include signatures in the Authorization header.

  • Include the signature information only in the URL request parameter

GET /oss.jpg?OSSAccessKeyId=nz2pc56s936****&Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv****
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 06:38:30 GMT

For more information, see Add signatures to URLs.