Rajat Gupta05 wrote:
In that case response is "??????????????user1"
Rajat,
you are talking about HTTP headers, so below is relevant if you are
using the correct words and refer effectively to HTTP headers.
I think what Mark was tying to tell you before is :
The current HTTP specification does not allow for HTTP header values to
be encoded in anything else than ASCII or, at the limit, ISO-8859-1.
The HTTP official specification, RFC2616, talks of "octets" for the
value of a header (which theoretically would be any combination of 8-bit
bytes), but also refers to another RFC, much older, RFC822.
And that one says :
3.1.2. STRUCTURE OF HEADER FIELDS
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, with Japanese characters in HTTP headers, you are outside of the
HTTP specification, and you cannot expect any webserver (or proxy) to
handle this in any consistent manner.
HTTP headers can specify the type and character set of the HTTP message
/body/, but there exists to my knowledge no mechanism to specify the
character set of a HTTP header.
However, if you are talking about the HTTP request line (the URL), and
not about HTTP headers, then please restate your question correctly.
Thanks
Rajat
-----Original Message-----
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Wednesday, March 18, 2009 7:07 PM
To: Tomcat Users List
Subject: Re: Issue in sending Request/response http headers containing Japanese
charateres
Rajat Gupta05 wrote:
Hey Mark,
Thanks for your response... I have tried to isolate the issue if it is being
caused by Apache/Mod_jk/Tomcat. Firstly I tried a request to standlone apache
with customize d header having Japanese characters. The requested page displays
the headers in the request. To my surprise Apache is not dealing with Japanese
characters correctly and replacing them with some junk value. For example I
addedミが完たソ税一使饅漢社氏ソ圧user1 in the request header and wht I received was
~ª®½\Åêgé\¿Ð¿³user1.
Also to add the same thing works when make request to apache configured to
reverse proxy. Can any one provide explanation to that?
RFC2616. You have to use ISO-8859-1.
Mark
Thanks
Rajat
-----Original Message-----
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Wednesday, March 18, 2009 6:27 PM
To: Tomcat Users List
Subject: Re: Issue in sending Request/response http headers containing Japanese
charateres
Rajat Gupta05 wrote:
Hi All,
I have a configuration where Apache(2.2) -->Mod_jk-->Tomcat(5.0) for my program.
Now whenever I receive request or response having httpheaders with Japanese
charaters, those are either replaced by ??? or they are replaced by some junk
charateres.
Please see the Japanese headers are encoded with SHIFT_JIS encoding. Is there
are a way where we can provide this encoding inside Apcahe/mod_jk/Tomcat.
Any help would be really appreciated.
http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q4
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org