You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sv...@apache.org on 2005/02/08 13:13:39 UTC
cvs commit: incubator-myfaces/src/components/org/apache/myfaces/component/html/util AddResource.java
svieujot 2005/02/08 04:13:39
Modified: src/components/org/apache/myfaces/component/html/util
AddResource.java
Log:
Bugfix : Serve xsl files with the text/xml content type.
Revision Changes Path
1.18 +7 -6 incubator-myfaces/src/components/org/apache/myfaces/component/html/util/AddResource.java
Index: AddResource.java
===================================================================
RCS file: /home/cvs/incubator-myfaces/src/components/org/apache/myfaces/component/html/util/AddResource.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- AddResource.java 27 Dec 2004 04:11:11 -0000 1.17
+++ AddResource.java 8 Feb 2005 12:13:39 -0000 1.18
@@ -41,6 +41,9 @@
* @author Sylvain Vieujot (latest modification by $Author$)
* @version $Revision$ $Date$
* $Log$
+ * Revision 1.18 2005/02/08 12:13:39 svieujot
+ * Bugfix : Serve xsl files with the text/xml content type.
+ *
* Revision 1.17 2004/12/27 04:11:11 mmarinschek
* Data Table stores the state of facets of children; script tag is rendered with type attribute instead of language attribute, popup works better as a column in a data table
*
@@ -269,10 +272,8 @@
response.setContentType("image/png");
else if( lcResourceFileName.endsWith(".jpg") || lcResourceFileName.endsWith(".jpeg") )
response.setContentType("image/jpeg");
- else if( lcResourceFileName.endsWith(".xml") )
- response.setContentType("text/xml");
- else if( lcResourceFileName.endsWith(".xsl") )
- response.setContentType("text/xsl");
+ else if( lcResourceFileName.endsWith(".xml") || lcResourceFileName.endsWith(".xsl") )
+ response.setContentType("text/xml"); // XSL has to be served as XML.
InputStream is = getResource(componentName, resourceFileName);
if( is == null ){