All Products
Search
Document Center

:After using the Alibaba Cloud Content Delivery Network, accessing the HTML page and returning "Content-Type: application/octet-stream" causes it to become a download page

更新時間:May 20, 2022

Problem description

After using the Alibaba Cloud Content Delivery Network, the content returned by accessing an HTML page is not a Content-Type: text/html, but a Content-Type: application/octet-stream, causing the accessing page to become a download.

Cause

When the request does not pass through the Alibaba Cloud Content Delivery Network, it directly specifies the source station to access, and finds that the Response Headers responded by the source station does not respond to Content-Type, so the Alibaba Cloud Content Delivery Network will bring Content-Type: application/octet-stream.

Solutions

Currently, the Alibaba Cloud Content Delivery Network policy for responding to Content-Type is as follows:

  • If the source station responds to Content-Type, the Alibaba Cloud Content Delivery Network follows the Content-Type of the source station.
  • If the source station does not respond to Content-Type, the Alibaba Cloud Content Delivery Network will automatically add Content-Type: application/octet-stream.

At present, the Alibaba Cloud Content Delivery Network cannot automatically respond to the corresponding Content-Type according to the file type when the source station does not respond to Content-Type. It is recommended to modify the source station configuration.

Related topic

How to Solve Alibaba Cloud Content Delivery Network Domain Name Accessing. html File Becomes Downloading the File

Application scope

  • CDN
  • DCDN