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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]