Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 88957 invoked from network); 1 Dec 2004 18:15:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Dec 2004 18:15:12 -0000 Received: (qmail 48723 invoked by uid 500); 1 Dec 2004 18:14:27 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 48632 invoked by uid 500); 1 Dec 2004 18:14:26 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 48349 invoked by uid 99); 1 Dec 2004 18:14:21 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from anduin.net (HELO anduin.net) (212.12.46.226) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Dec 2004 10:14:17 -0800 Received: from mailnull by anduin.net with dspam-scanned (Exim 4.43 (FreeBSD)) id 1CZYwC-000E8c-UK for tomcat-user@jakarta.apache.org; Wed, 01 Dec 2004 19:10:48 +0100 Received: from mailnull by anduin.net with spamassassin-scanned (Exim 4.43 (FreeBSD)) id 1CZYw5-000E8E-ML for tomcat-user@jakarta.apache.org; Wed, 01 Dec 2004 19:10:48 +0100 Received: from ranger.anduin.net ([81.0.162.52] helo=[192.168.1.10]) by anduin.net with esmtp (Exim 4.43 (FreeBSD)) id 1CZYw5-000E8B-Fz for tomcat-user@jakarta.apache.org; Wed, 01 Dec 2004 19:10:41 +0100 Message-ID: <41AE09ED.1000704@unicore.no> Date: Wed, 01 Dec 2004 19:14:05 +0100 From: =?ISO-8859-1?Q?Eirik_=D8verby?= User-Agent: Mozilla Thunderbird 0.9 (Macintosh/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Content-Type rewriting in jakarta-tomcat-connectors References: <9D5AD7C0D9B82045B86F632FE86BA3C80240A37B@delmail1.sapient.com> <41AE07B3.7080300@unicore.no> In-Reply-To: <41AE07B3.7080300@unicore.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on anduin.net X-Spam-Level: X-Spam-Status: No, hits=-4.8 required=7.5 tests=AWL,BAYES_00 autolearn=ham version=2.64 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, Follow-up: The same happens when using Tomcat stand-alone - i.e. no Apache and no jk. /Eirik Eirik �verby wrote: > Hi, > > no, it is not related at all to the oft-discussed UTF-8 issues. > This simply has to do with how the connector splits up the Content-Type > string and then sews it together without adding a space after the ;. > > /Eirik > > Arnab Chakravarty wrote: > >> Eirik, >> >> Does it have anything to do with UTF-8 encoding support (using >> different charsets - Chinese or Japanese) on jsp page and would break >> (not displaying the non-english characters) on tomcat 5.0.29. >> >> Arnab >> >> -----Original Message----- >> From: Eirik �verby [mailto:eirik@unicore.no] Sent: Wednesday, December >> 01, 2004 11:15 PM >> To: tomcat-user@jakarta.apache.org >> Subject: Content-Type rewriting in jakarta-tomcat-connectors >> >> Hi, >> >> After upgrading from tomcat 4.1 to 5.0, a critical application here has >> stopped working as expected. Upon replying to incoming requests, it >> would usually spit out the following - just like the servlet says: >> >> Content-Type: application/xml; charset=utf-8 >> >> In 5.0.29, this comes out as >> >> Content-Type: application/xml;charset=utf-8 >> >> In the second variant, the space between the ; and the charset string is >> gone. This breaks a *very* important service that we provide for a >> rather large credit card company. >> >> Without having studied RFCs and so on, I am pretty certain that it would >> be good coding-etiquette to have your app accept a Content-Type string >> with or without that space. Yes, I therefore know, it's their server - >> which sends the request to us - that has a lousy implementation. >> >> However, the key here is that the connector (more specifically around >> line 520 in >> jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java) >> >> is rewriting the carefully-constructed Content-Type string in a way that >> 1: I didn't ask for and 2: wasn't done in 4.1. >> >> Given that it is highly unlikely that anyone "at the other end" is going >> to do anything about this any time soon, and given that the solution is >> very trivial (add a space in that string composer in Response.java), how >> are the chances of seeing this 'fixed' in an upcoming release of Tomcat >> 5.0.x? >> >> I really would rather not have to maintain my own source for Tomcat - >> I've spent the better part of the last 6 months trying to wrestle the >> application we are running out of a customized environment and into a >> standardized one; this would go head-on with that effort.. :( >> >> >> Thanks for listening, >> /Eirik >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org >> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org >> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org