You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/09/23 23:40:16 UTC
DO NOT REPLY [Bug 36790] New: -
response.setContentType() never forgets "charset"
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36790>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36790
Summary: response.setContentType() never forgets "charset"
Product: Tomcat 5
Version: 5.0.28
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: jafshar@vignette.com
Shouldn't the following two-line jsp response with
Content-Type: application/x-foobar
?
<% response.setContentType("application/x-foobar");%>
Hello World at <%=new java.util.Date()%>.
It's actually responding with
Content-Type: application/x-foobar;charset=ISO-8859-1
1) Should "charset" only be appended to non-"text/*" content?
2) I think JSP compiler automatically adds a
setContentType("text/html;charset=ISO-8859-1") at the beginning if not present.
Regardless, shouldn't a subsequent setContentType() make it forget the previous
"charset"?
3) In a servlet, this works correctly:
response.setContentType("text/html; charset=utf-8");
response.reset();
response.setContentType("application/x-foobar");
It will not append "charset". Adding a response.reset() to the .jsp does not
help -- charset is still present.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org