[jboss-jira] [JBoss JIRA] Created: (JBPORTAL-2400) Error dialog when downloading binary content via serveResource over SSL using Internet Explorer
Philip Kedy (JIRA)
jira-events at lists.jboss.org
Sun May 24 16:17:56 EDT 2009
Error dialog when downloading binary content via serveResource over SSL using Internet Explorer
-----------------------------------------------------------------------------------------------
Key: JBPORTAL-2400
URL: https://jira.jboss.org/jira/browse/JBPORTAL-2400
Project: JBoss Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 2.7.2 Final
Reporter: Philip Kedy
Attachments: HTTPResponse.java
Our JBoss Portal implementation uses SSL. There are a few cases where our portlets serve binary documents (i.e. PDFs, DOCs) via the serveResource method.
Under Internet Explorer we encountered this issue:
http://support.microsoft.com/kb/812935
So we added the following treatment to the ResourceResponse.
response.setContentType(contentType);
response.setProperty("Pragma", "");
response.setProperty("Cache-Control", "private");
Calendar cal = Calendar.getInstance();
cal.add(Calendar.MINUTE, 5);
SimpleDateFormat sdf = new SimpleDateFormat("EE, w MMM yyyy HH:mm:ss z");
response.setProperty("Expires", sdf.format(cal.getTime()));
Our servlets worked after making this change but our portlets did not. Upon further investigation we found that the Pragma and Cache-Control headers we being added to the default headers that Tomcat/JBoss Web sets.
The fix for this is simple. In HTTPResponse I changed occurrences of
resp.addHeader(key, properties.getValue(key));
to
resp.setHeader(key, properties.getValue(key));
Being that properties are single key/value pair mappings the setHeader might be more appropriate in this case.
I have attached my version of HTTPResponse.java
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list