Resource interpreted as Document but transferred with MIME type application/zip

后端 未结 18 2350
不思量自难忘°
不思量自难忘° 2020-11-27 10:54

With Chrome 12.0.742.112, if I redirect with the following headers:

HTTP/1.1 302 Found 
Location: http://0.0.0.0:3000/files/download.zip
Content-Type: text/h         


        
18条回答
  •  眼角桃花
    2020-11-27 11:17

    This issue was re-appeared at Chrome 61 version. But it seems it is fixed at Chrome 62.

    I have a RewriteRule like below

    RewriteRule ^/ShowGuide/?$ https:///help.pdf [L,NC,R,QSA]
    

    With Chrome 61, the PDF was not opening, in console it was showing the message

    "Resource interpreted as Document but transferred with MIME type application/pdf: "
    

    We tried to add mime type in the rewrite rule as below but it didn't help.

    RewriteRule ^/ShowGuide/?$ https:///help.pdf [L,NC,R,QSA, t:application/pdf]
    

    I have updated my Chrome to latest 62 version and it started to showing the PDF again. But the message is still there in the console.

    With all other browsers, it was/is working fine.

提交回复
热议问题