0048-00000202

Updated at:

Problem Description

If you use the default public domain name 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 that are created on or after 00:00:00 (UTC+8) on August 5, 2024 anonymously or by using signed object URLs that contain the default public domain name, the requests are denied. The HTTP status code 400 and the ApkDownloadForbidden error code are returned.

Examples

When you use the public 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-cn-hangzhou.aliyuncs.com/test-file
* About to connect() to test-demo.oss-cn-hangzhou.aliyuncs.com port 80 (#0)
*   Trying 127.0.0.1...
* Connected to test-demo.oss-cn-hangzhou.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-cn-hangzhou.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-00000202
<
<?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-cn-hangzhou.aliyuncs.com</HostId>
  <EC>0048-00000202</EC>
  <RecommendDoc>https://www.alibabacloud.com/help/oss/support/0048-00000202</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.