Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 55375 invoked from network); 3 Feb 2006 08:55:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Feb 2006 08:55:04 -0000 Received: (qmail 39887 invoked by uid 500); 3 Feb 2006 08:54:57 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 39768 invoked by uid 500); 3 Feb 2006 08:54:56 -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 39757 invoked by uid 99); 3 Feb 2006 08:54:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2006 00:54:56 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [212.27.42.35] (HELO smtp5-g19.free.fr) (212.27.42.35) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2006 00:54:55 -0800 Received: from [192.168.0.1] (gou06-1-82-224-99-120.fbx.proxad.net [82.224.99.120]) by smtp5-g19.free.fr (Postfix) with ESMTP id 48F23180AA for ; Fri, 3 Feb 2006 09:54:34 +0100 (CET) Message-ID: <43E31A4A.2030408@apache.org> Date: Fri, 03 Feb 2006 09:54:34 +0100 From: Remy Maucherat User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: svn commit: r371765 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java References: <200602021932.k12JW6a0020567@harpy.wilshire.com> <43E25EFF.5090406@Sun.COM> In-Reply-To: <43E25EFF.5090406@Sun.COM> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Jan Luehe wrote: > I don't think you are misunderstanding the spec. > > See the following javadocs snippets from ServletResponse: > > public String getCharacterEncoding(): > > * If no character encoding > * has been specified, ISO-8859-1 is returned. > > > public PrintWriter getWriter() throws IOException: > > * If the response's character encoding has not been > * specified as described in getCharacterEncoding > * (i.e., the method just returns the default value > * ISO-8859-1), getWriter > * updates it to ISO-8859-1. > > > public void setCharacterEncoding(String charset): > > *

Containers *must* communicate the character encoding used for > * the servlet response's writer to the client if the protocol > * provides a way for doing so. In the case of HTTP, the character > * encoding is communicated as part of the Content-Type > * header for text media types. Yes, but the strict dumb application of what ended up being written written is definitely not what they intended, because it brings no benefits. I think everyone agrees that if the application is very careful about not specifying a charset anywhere, it shouldn't be forcefully added to the content-type header. Anyway: - Did you read the "for text media types" portion ? I find it important. - "communicated as part of the Content-Type header": ISO-8859-1 is the default for HTTP, so one could consider it is communicated even if it is not physically present in the Content-Type header. R�my --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org