Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 49388200CBA for ; Mon, 19 Jun 2017 02:19:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 47F5A160BEE; Mon, 19 Jun 2017 00:19:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8E11D160BE3 for ; Mon, 19 Jun 2017 02:19:42 +0200 (CEST) Received: (qmail 10359 invoked by uid 500); 19 Jun 2017 00:19:41 -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 10348 invoked by uid 99); 19 Jun 2017 00:19:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2017 00:19:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 07A97C0310 for ; Mon, 19 Jun 2017 00:19:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.002 X-Spam-Level: X-Spam-Status: No, score=-0.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id j66vlW-k5JXY for ; Mon, 19 Jun 2017 00:19:39 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 0D0545FB6A for ; Mon, 19 Jun 2017 00:19:39 +0000 (UTC) Received: from asf-bz1-us-mid.priv.apache.org (nat1-us-mid.apache.org [23.253.172.122]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTPS id 4BB76E0185 for ; Mon, 19 Jun 2017 00:19:38 +0000 (UTC) Received: by asf-bz1-us-mid.priv.apache.org (ASF Mail Server at asf-bz1-us-mid.priv.apache.org, from userid 33) id 7C0F760021; Mon, 19 Jun 2017 00:19:35 +0000 (UTC) From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: [Bug 61197] New: Breaking change in Content-Type / Character Encoding handling Date: Mon, 19 Jun 2017 00:19:34 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 8 X-Bugzilla-Component: Catalina X-Bugzilla-Version: 8.5.15 X-Bugzilla-Keywords: X-Bugzilla-Severity: regression X-Bugzilla-Who: matthew@matt-shaw.co.uk X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: ---- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bz.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 archived-at: Mon, 19 Jun 2017 00:19:43 -0000 https://bz.apache.org/bugzilla/show_bug.cgi?id=3D61197 Bug ID: 61197 Summary: Breaking change in Content-Type / Character Encoding handling Product: Tomcat 8 Version: 8.5.15 Hardware: All OS: All Status: NEW Severity: regression Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: matthew@matt-shaw.co.uk Target Milestone: ---- I *believe* this constitutes some level of regression, based on distinct difference from prior behaviour, but please correct me if I'm wrong :) Also= I couldn't find any clear mention of this change in the change log for 8.5.15. Prior to 8.5.15 (specifically, this commit: https://github.com/apache/tomcat/commit/b2bab804b543bfe181fe435efe35628ce0e= 21b39) the behaviour of `org.apache.catalina.connector.Response` when setting the content-type with encoding parameter included, e.g. `setContentType("application/json;charset=3DMS932")`, was to simply take the provided encoding string and set this for the output. As long as the character set was supported by the JVM (as a specific code p= age, or an alias of one of the supported code pages), requests would return with= the *exact* character set string provided. Since the above commit / 8.5.15 release, this is now forcibly modified with= no option to disable such behaviour. For instance, if I specify "MS932" or "windows-932" this is replaced now with "windows-31j" , or "eucjis" with "EUC-JP", "sjis" with "Shift-JIS", etc. This may seem like a reasonable behaviour for modern systems that we would *hope* support mapping aliased encodings, but with legacy systems unable to handle this (and any system that, stupidly or otherwise, checks for a speci= fic encoding string, possibly in a case-sensitive manner), suddenly we have bro= ken behaviour. The client expects one encoding string and receives something equivalent but that it just can't handle. Unfortunately I'm now stuck in this situation as a legacy-systems integrati= ons engineer. We *have* to be able to provide our output with very specific encoding strings set or else several dozen systems we (sadly) can't change = will break. Thankfully we caught this in internal testing of the upgrade to 8.5.= 15 and can put it off temporarily, but we're now also stuck with either needin= g to maintain our own patched version of Tomcat to revert this behaviour, not continue updating (not a real option given security requirements), or possi= bly review migrating to an alternative servlet container (please no q_q). --=20 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