Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 39744 invoked from network); 7 Dec 2000 20:06:04 -0000 Received: from lukla.sun.com (192.18.98.31) by locus.apache.org with SMTP; 7 Dec 2000 20:06:04 -0000 Received: from centralmail1.Central.Sun.COM ([129.147.62.10]) by lukla.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id NAA17169 for ; Thu, 7 Dec 2000 13:06:03 -0700 (MST) Received: from esun1as-mm. (esun1as-mm.Central.Sun.COM [129.147.34.144]) by centralmail1.Central.Sun.COM (8.9.3+Sun/8.9.3/ENSMAIL,v1.7) with SMTP id NAA29490 for ; Thu, 7 Dec 2000 13:06:02 -0700 (MST) Received: from eng.sun.com by esun1as-mm. (SMI-8.6/SMI-SVR4) id NAA28354; Thu, 7 Dec 2000 13:19:30 -0700 Message-ID: <3A2FEE04.692C13E9@eng.sun.com> Date: Thu, 07 Dec 2000 12:07:33 -0800 From: "Craig R. McClanahan" X-Mailer: Mozilla 4.76 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: Re: My patches for Tomcat 3.2 wrt mutlibyte characters References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Pilho Kim wrote: > Hi, Costin > > If you want to get Content-Length, > is String.length() valid or not ? > > Tomcat dvelopers, containg you, must know this. > HTTP/1.1 spec (i.e. RFC 2616), Section 14.13: "The Content-Length entity-header field indicates the size of the entity-body, in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET." In other words, content length is measured in bytes, not characters. Therefore, String.length() does not give you the right answer. > > Kim. > Craig McClanahan