0048-00000203

Updated at:

Problem Description

If you use OSS-accelerated domain names of a bucket to access an object whose MIME type (the Content-Type response header) is application/vnd.android.package-archive or application/iphone in the bucket, the HTTP status code 400 is returned.

Causes

To enhance data security, if you access objects whose MIME type (the Content-Type response header) is application/vnd.android.package-archive or application/iphone in buckets for which the transfer acceleration feature is enabled on or after 00:00:00 (UTC+8) on August 5, 2024 anonymously or by using signed object URLs that contain OSS-accelerated domain names (format: bucketname.oss-accelerate.aliyuncs.com or bucketname.oss-accelerate-overseas.aliyuncs.com), the requests are denied. The HTTP status code 400 and the ApkDownloadForbidden error code are returned.

Examples

When you use an OSS-accelerated domain name of a bucket to access objects whose MIME type (the Content-Type response header) is application/vnd.android.package-archive in the bucket, the following output is returned:

curl -v http://test-demo.oss-accelerate.aliyuncs.com/test-file
* About to connect() to test-demo.oss-accelerate.aliyuncs.com port 80 (#0)
*   Trying 127.0.0.1...
* Connected to test-demo.oss-accelerate.aliyuncs.com (127.0.0.1) port 80 (#0)
> GET /test-file HTTP/1.1
> User-Agent: curl/7.29.0
> Host: test-demo.oss-accelerate.aliyuncs.com
> Accept: */*
>
< HTTP/1.1 400 Bad Request
< Server: AliyunOSS
< Date: Wed, 05 Jun 2024 09:44:52 GMT
< Content-Type: application/xml
< Content-Length: 450
< Connection: keep-alive
< x-oss-request-id: 66603394A9D9AEAD99000223
< Accept-Ranges: bytes
< ETag: "A28BCA1B906F539BA70CA3A0B1F2E773"
< Last-Modified: Wed, 05 Jun 2024 08:25:31 GMT
< x-oss-object-type: Normal
< x-oss-hash-crc64ecma: 1026653970686684427
< x-oss-storage-class: Standard
< x-oss-server-time: 209
< x-oss-ec: 0048-00000203
<
<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>ApkDownloadForbidden</Code>
  <Message>The APK file is not allowed to be distributed in a public network using the OSS endpoint, please use CNAME instead.</Message>
  <RequestId>66603394A9D9AEAD99000223</RequestId>
  <HostId>test-demo.oss-accelerate.aliyuncs.com</HostId>
  <EC>0048-00000203</EC>
  <RecommendDoc>https://www.alibabacloud.com/help/oss/support/0048-00000203</RecommendDoc>;
</Error>

Solutions

Use a custom domain name to access the preceding objects. In this case, requests are not denied. For more information, see Access OSS through a custom domain name.