struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject git commit: WW-3506 Adds additional Http headers to solve problem with IE
Date Tue, 08 Jul 2014 20:29:30 GMT
Repository: struts
Updated Branches:
  refs/heads/develop 19b939cfb -> 01e338098


WW-3506 Adds additional Http headers to solve problem with IE


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/01e33809
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/01e33809
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/01e33809

Branch: refs/heads/develop
Commit: 01e33809804c513f414a29e68626cff372dfbbdb
Parents: 19b939c
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Tue Jul 8 22:29:15 2014 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Tue Jul 8 22:29:15 2014 +0200

----------------------------------------------------------------------
 .../struts2/views/jasperreports/JasperReportsResult.java     | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/01e33809/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
----------------------------------------------------------------------
diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
index aa1fe1f..0e366a1 100644
--- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
+++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
@@ -286,6 +286,14 @@ public class JasperReportsResult extends StrutsResultSupport implements
JasperRe
         if (conn == null)
             stackDataSource = new ValueStackDataSource(stack, dataSource);
 
+        if ("https".equalsIgnoreCase(request.getScheme())) {
+            // set the the HTTP Header to work around IE SSL weirdness
+            response.setHeader("CACHE-CONTROL", "PRIVATE");
+            response.setHeader("Cache-Control", "maxage=3600");
+            response.setHeader("Pragma", "public");
+            response.setHeader("Accept-Ranges", "none");
+        }
+
         // Determine the directory that the report file is in and set the reportDirectory
parameter
         // For WW 2.1.7:
         //  ServletContext servletContext = ((ServletConfig) invocation.getInvocationContext().get(ServletActionContext.SERVLET_CONFIG)).getServletContext();


Mime
View raw message