Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 283016

Summary: [RMS] Wrong filename for rapdemo.war download
Product: [RT] RAP Reporter: RĂ¼diger Herrmann <ruediger.herrmann>
Component: DemoAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: vasko
Version: 1.3   
Target Milestone: 1.3 M1   
Hardware: All   
OS: All   
URL: http://rap.eclipsesource.com/rapdemo/rms
Whiteboard:

Description RĂ¼diger Herrmann CLA 2009-07-09 09:28:07 EDT
Steps to reproduce
1. Use Internet Explorer 8
2. Run the RMS demo from http://rap.eclipsesource.com/rapdemo/rms
3. Click on the demo.war link under the "Downloads" section
4. The "Save As" dialog appears and suggests to save the file as *zip* file
Expected
The suggestion should be to save the file as a *war* file.
Comment 1 Vasko Tchoumatchenko CLA 2009-07-24 15:27:20 EDT
This links points to a static resource, served by Tomcat's Default Servlet.

The problem is that the response does not contain Content-type header. IE is doing some "MIME-sniffing" and changes the extension to zip. 

The solution is to add the following declaration to $CATALINA_HOME/conf/web.xml

    <mime-mapping>
      <extension>war</extension>
      <mime-type>application/zip</mime-type>
    </mime-mapping>

Tomcat will send the correct header "Content-Type: application/zip" and IE will accept the war extension.
Comment 2 Ralf Sternberg CLA 2009-07-25 04:21:33 EDT
Added the the proposed declaration, but not to the global web.xml, but to the download application's web.xml.