struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [2/4] struts git commit: fix for WW-4564
Date Sat, 02 Jan 2016 17:31:54 GMT
 fix for WW-4564

Postback result is rendered as plain-text rather than html form in
Chrome

the response's content type must be set to text/html in order for Chrome
to properly handle the operation.

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

Branch: refs/heads/master
Commit: d5a6c355891b06f803d3dfb8a8ddea6249093f0c
Parents: 70b1b2c
Author: Victor Sosa <victornsosa@gmail.com>
Authored: Thu Dec 31 20:10:19 2015 -0400
Committer: Victor Sosa <victornsosa@gmail.com>
Committed: Thu Dec 31 20:37:06 2015 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/struts2/result/PostbackResult.java  | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/d5a6c355/core/src/main/java/org/apache/struts2/result/PostbackResult.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/result/PostbackResult.java b/core/src/main/java/org/apache/struts2/result/PostbackResult.java
index 53c8ecc..3b48ac0 100644
--- a/core/src/main/java/org/apache/struts2/result/PostbackResult.java
+++ b/core/src/main/java/org/apache/struts2/result/PostbackResult.java
@@ -76,6 +76,10 @@ import java.util.Map;
  */
 public class PostbackResult extends StrutsResultSupport {
 
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -2283504349296877429L;
     private String actionName;
     private String namespace;
     private String method;
@@ -96,10 +100,10 @@ public class PostbackResult extends StrutsResultSupport {
             response.setHeader("Pragma", "no-cache"); // HTTP 1.0
             response.setDateHeader("Expires", 0); // Proxies
         }
-        
+
         //set contenttype @see ww-4564
         response.setContentType("text/html");
-
+        
         // Render
         PrintWriter pw = new PrintWriter(response.getOutputStream());
         pw.write("<!DOCTYPE html><html><body><form action=\"" + finalLocation
+ "\" method=\"POST\">");


Mime
View raw message