You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Bob Herrmann <bo...@jadn.com> on 2002/08/06 00:00:09 UTC

Jasper

Hi, right now tomcat says this (for JSP pages)

   Content-Type: text/html;ISO-8859-1

my reading of the HTTP1.1 spec says it should be this,

   Content-Type: text/html;charset=ISO-8859-1

(Add in the "charset=" bit) This tiny patch seems to do the trick? 
Kinman, is this right?  or is the ISO-8859-1 supposed to also be quoted?

Cheers,
-bob

Index: jasper2/src/share/org/apache/jasper/compiler/Validator.java
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java,v
retrieving revision 1.18
diff -u -r1.18 Validator.java
--- jasper2/src/share/org/apache/jasper/compiler/Validator.java	2 Aug
2002 19:30:02 -0000	1.18
+++ jasper2/src/share/org/apache/jasper/compiler/Validator.java	5 Aug
2002 21:50:53 -0000
@@ -858,7 +858,7 @@
 	    String charset = pageInfo.getPageEncoding();
 	    if (charset == null)
 		charset = isXml? "UTF-8": "ISO-8859-1";
-	    pageInfo.setContentType(defaultType + ";" + charset);
+	    pageInfo.setContentType(defaultType + ";charset=" + charset);
 	}
 
 	/*



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>