tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote Response.java
Date Tue, 14 Oct 2003 05:49:28 GMT
>   @@ -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


Mime
View raw message