Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 99738 invoked from network); 14 Oct 2003 05:38:44 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 14 Oct 2003 05:38:44 -0000 Received: (qmail 43345 invoked by uid 500); 14 Oct 2003 05:38:15 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 43297 invoked by uid 500); 14 Oct 2003 05:38:14 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 43283 invoked from network); 14 Oct 2003 05:38:14 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by daedalus.apache.org with SMTP; 14 Oct 2003 05:38:14 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1A9Ht3-0004MA-00 for ; Tue, 14 Oct 2003 07:38:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: tomcat-dev@jakarta.apache.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A9Ht2-0004M2-00 for ; Tue, 14 Oct 2003 07:38:24 +0200 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1A9Ht2-0006lQ-00 for ; Tue, 14 Oct 2003 07:38:24 +0200 From: "Bill Barker" Subject: Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote Response.java Date: Mon, 13 Oct 2003 22:49:28 -0700 Lines: 36 Message-ID: References: <20031013233624.76110.qmail@minotaur.apache.org> X-Complaints-To: usenet@sea.gmane.org X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > @@ -510,14 +509,19 @@ > } > > this.contentType = contentType.substring(0, beginCharsetParam); > - String tail = contentType.substring(beginCharsetParam + 1); > + // Trim the semicolon preceding the charset > + int charsetSemi = this.contentType.lastIndexOf(';'); This is still not working for me. Now I can't do stuff like: setContentType("text/html; charset=utf-8; altcharset=iso-latin-1"); I don't know any current browser that uses this, but it is completely valid in RFC 2616. > + if (charsetSemi != -1) { > + this.contentType = this.contentType.substring(0, charsetSemi); > + } > + String tail = contentType.substring(beginCharsetParam); > int nextParam = tail.indexOf(';'); > String charsetValue = null; > if (nextParam != -1) { > this.contentType += tail.substring(nextParam); > - charsetValue = tail.substring(beginCharsetValue, nextParam); > + charsetValue = tail.substring(BEGIN_CHARSET_VALUE, nextParam); > } else { > - charsetValue = tail.substring(beginCharsetValue); > + charsetValue = tail.substring(BEGIN_CHARSET_VALUE); > } > // The charset value may be quoted, but must not contain any quotes. > charsetValue = charsetValue.replace('"', ' '); --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org