tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Herrmann <...@jadn.com>
Subject Jasper
Date Mon, 05 Aug 2002 22:00:09 GMT

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:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message