[gatein-commits] gatein SVN: r5206 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Nov 22 11:32:05 EST 2010


Author: mwringe
Date: 2010-11-22 11:32:04 -0500 (Mon, 22 Nov 2010)
New Revision: 5206

Modified:
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
Log:
GTNWSRP-169: if we receive a response which contains characters we should treat this as a text file. Note that some mime types (for example application/javascript) should be treated as text.

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java	2010-11-22 16:28:06 UTC (rev 5205)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java	2010-11-22 16:32:04 UTC (rev 5206)
@@ -437,7 +437,7 @@
 
             log.trace("Try to get a resource of type: " + contentType + " for the portlet: "
                + uiPortlet.getPortletContext());
-            if (contentType.startsWith("text"))
+            if (piResponse.getChars() != null || contentType.startsWith("text"))
             {
                context.getResponse().setContentType(contentType);
                context.getWriter().write(piResponse.getContent());



More information about the gatein-commits mailing list