myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r960241 - /myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
Date Sat, 03 Jul 2010 17:30:50 GMT
Author: lu4242
Date: Sat Jul  3 17:30:50 2010
New Revision: 960241

URL: http://svn.apache.org/viewvc?rev=960241&view=rev
Log:
MYFACES-2779 PartialResponse bogus response on render all because of falsely positioned development
stage script tag (fix supported content type ordering)

Modified:
    myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java

Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java?rev=960241&r1=960240&r2=960241&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
(original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
Sat Jul  3 17:30:50 2010
@@ -1920,6 +1920,15 @@ public final class HtmlRendererUtils {
     private static String APPLICATION_XML_CONTENT_TYPE = "application/xml";
     private static String TEXT_XML_CONTENT_TYPE = "text/xml";
 
+    // The order is important in this case.
+    private static final String [] SUPPORTED_CONTENT_TYPES = {
+            HTML_CONTENT_TYPE, //Prefer this over any other, because IE does not support
XHTML content type
+            XHTML_CONTENT_TYPE,
+            APPLICATION_XML_CONTENT_TYPE,
+            TEXT_XML_CONTENT_TYPE,
+            TEXT_ANY_CONTENT_TYPE,
+            ANY_CONTENT_TYPE
+        };
 
     public static String selectContentType(String contentTypeListString)
     {
@@ -1993,9 +2002,9 @@ public final class HtmlRendererUtils {
 
     public static String[] getSupportedContentTypes()
     {
-        String[] supportedContentTypeArray = new String[]{HTML_CONTENT_TYPE,TEXT_ANY_CONTENT_TYPE,ANY_CONTENT_TYPE,
-                                                          XHTML_CONTENT_TYPE,APPLICATION_XML_CONTENT_TYPE,TEXT_XML_CONTENT_TYPE};
-        return supportedContentTypeArray;
+        //String[] supportedContentTypeArray = new String[]{HTML_CONTENT_TYPE,TEXT_ANY_CONTENT_TYPE,ANY_CONTENT_TYPE,
+        //                                                  XHTML_CONTENT_TYPE,APPLICATION_XML_CONTENT_TYPE,TEXT_XML_CONTENT_TYPE};
+        return SUPPORTED_CONTENT_TYPES;
     }
 
     private static boolean isHTMLContentType(String contentType)



Mime
View raw message