Repository: struts
Updated Branches:
  refs/heads/master 3480bc3c1 -> 8aebdc3e6


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/70b1b2c4
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/70b1b2c4
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/70b1b2c4

Branch: refs/heads/master
Commit: 70b1b2c497e929a3403c2bde0f8bec46dec8ccf9
Parents: 9cc383e
Author: Victor Sosa <[email protected]>
Authored: Thu Dec 31 18:04:43 2015 -0400
Committer: Victor Sosa <[email protected]>
Committed: Thu Dec 31 18:04:43 2015 -0400

----------------------------------------------------------------------
 core/src/main/java/org/apache/struts2/result/PostbackResult.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/70b1b2c4/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 dbb0c0e..53c8ecc 100644
--- a/core/src/main/java/org/apache/struts2/result/PostbackResult.java
+++ b/core/src/main/java/org/apache/struts2/result/PostbackResult.java
@@ -96,6 +96,9 @@ 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());

Reply via email to