Uploaded image for project: 'JBoss Portal'
  1. JBoss Portal
  2. JBPORTAL-2400

Error dialog when downloading binary content via serveResource over SSL using Internet Explorer

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.7.2 Final
    • Fix Version/s: 2.7.3 Final
    • Component/s: None
    • Labels:
      None

      Description

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  pkedy Philip Kedy
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: