开发者

Jboss returns no content-type for MSI

开发者 https://www.devze.com 2023-01-17 12:41 出处:网络
I have placed a .MSI-file in the folder C:\\JBoss\\server\\default\\deploy\\install.war on my web server which is running Jboss. The idea is that web page visitors should be able to download the file

I have placed a .MSI-file in the folder C:\JBoss\server\default\deploy\install.war on my web server which is running Jboss. The idea is that web page visitors should be able to download the file by visiting http://example.com/install/file.msi.

Now, if a user goes to to this URL with his web browser, instead of getting a "Do you want to dow开发者_JAVA技巧nload this file"-dialog, the contents of the MSI file is shown directly in the web browser window (in other words, the binary data).

I installed Fiddler and have saw that Jboss sends no Content-Type header when accessing the file. If I access an .exe file in the same directory, Jboss sends a Content-Type with value "application/octet-stream".

How do I configure Jboss to send the same content-type for the .MSI file type? I'm guessing there's some config file I need to add this to?


Found the answer using Google. Add a MIME type mapping to web.xml.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号