0004-00000501

更新时间:
复制 MD 格式

Problem description

OSS returns an error when x-oss-traffic-limit appears in both the request header and the query parameter of the same request.

Causes

The request includes x-oss-traffic-limit in both the request header and as a URL query parameter simultaneously. OSS does not accept the parameter in both locations at once.

Examples

The following request triggers the error because x-oss-traffic-limit is set in both the query string and the request header:

GET /test.txt?x-oss-traffic-limit=819200 HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS AK***ID:si8****Io==
x-oss-traffic-limit: 819200

Solutions

Remove x-oss-traffic-limit from one location. Choose one of the following methods:

Request header — include x-oss-traffic-limit only in the request header:

GET /test.txt HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS AK***ID:si8****Io==
x-oss-traffic-limit: 819200

Query parameter — use x-oss-traffic-limit only as a URL request parameter:

GET /test.txt?x-oss-traffic-limit=819200 HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS AK***ID:si8****Io==

For more information about single-connection bandwidth throttling, see Single-connection bandwidth throttling.