tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: How to control encoding of response.sendRedirect? (Tomcat 5.5.17)
Date Mon, 24 Sep 2007 13:00:59 GMT
Hash: SHA1


Mark Thomas wrote:
> Check the HTTP spec. I am pretty sure (but haven't checked) that the
> headers must always be in ISO-8859-1.

The HTTP spec doesn't say: it points to RFC 822.

- From RFC 822, section 3.1.2:

"Once a field has been unfolded, it may be viewed as being com-
posed of a field-name followed by a colon (":"), followed by a
field-body, and  terminated  by  a  carriage-return/line-feed.
The  field-name must be composed of printable ASCII characters
(i.e., characters that  have  values  between  33.  and  126.,
decimal, except colon).  The field-body may be composed of any
ASCII characters, except CR or LF.  (While CR and/or LF may be
present  in the actual text, they are removed by the action of
unfolding the field.)"

So the fields themselves must be in ASCII. Since there's a provision for
encoding other stuff in ASCII (%-codes for URLs), you should be able to
do this.

Unfortunately, I can't find anywhere in the spec that says which
encoding to use in URLs for % HEX HEX encoding.

- -chris

Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message