Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 41A50C1DE for ; Sun, 3 Jun 2012 17:56:03 +0000 (UTC) Received: (qmail 93296 invoked by uid 500); 3 Jun 2012 17:56:02 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 93051 invoked by uid 500); 3 Jun 2012 17:56:02 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 93042 invoked by uid 99); 3 Jun 2012 17:56:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jun 2012 17:56:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jun 2012 17:56:00 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id CDB9B5A94; Sun, 3 Jun 2012 17:55:38 +0000 (UTC) From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: [Bug 53353] New: Malformed contentType attribute results in two charset values Date: Sun, 03 Jun 2012 17:55:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 7 X-Bugzilla-Component: Catalina X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: knst.kolinko@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: priority bug_id assigned_to short_desc bug_severity classification op_sys reporter rep_platform bug_status version component product Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 https://issues.apache.org/bugzilla/show_bug.cgi?id=53353 Priority: P2 Bug ID: 53353 Assignee: dev@tomcat.apache.org Summary: Malformed contentType attribute results in two charset values Severity: normal Classification: Unclassified OS: Windows XP Reporter: knst.kolinko@gmail.com Hardware: PC Status: NEW Version: 7.0.27 Component: Catalina Product: Tomcat 7 If contentType attribute of a JSP page has a broken value, Tomcat 7 can behave strangely and send two charset values in Content-Type header. To reproduce: 1. Create this simple JSP file, ROOT/test.jsp Note, that there is a typo: "UTF-8" instead of "charset=UTF-8". It is what triggers this issue. [[[ <%@page pageEncoding="UTF-8" contentType="text/html; UTF-8" %> Hello world! ]]] 2. Start Tomcat and access the page with Firefox http://localhost:8080/test.jsp (I am using version 12, with Live HTTP Headers addon). When the page loads: right-click -> Page info -> look for the value of Encoding. Then look for the value of Content-Type header. With current Tomcat 6.0: Encoding: UTF-8 Content-Type header: text/html; UTF-8;charset=UTF-8 With current Tomcat 7.0 (7.0.23): Encoding: ISO-8859-1 Content-Type header: text/html; UTF-8;charset=UTF-8;charset=ISO-8859-1 =============== I think it is related to new contentType header parser (fix for bug 52811: r1300154 + r1300155 + r1304275 + r1304895). It is not a very convincing example, but it looks like it confirms the fears against backporting the fix for bug 52811 to 6.0. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org