Re: Encoding used for strings sent through http response header

For HTTP headers (not the data in the URI or the body),
the official position is that they have to be encoded
with RFC 2047 (very complicated).

Regards,   Martin.

At 08:48 02/02/20 +0530, souravm wrote:
>Hi All,
>
>A doubt regarding the encoding used for strings sent through http
>response header.
>
>Let us assume that a JSP is written where at the first line using
>content type the encoding for the page is set to UTF-8. After that a
>response header field, say hdrError,  is set where the value set is non
>english string.
>
>My doubt is whether for this header field hdrError also the encoding
>applied while sending the request will be UTF-8 ? Or in this case the
>encoding applied will be default encoding type of JVM   ?
>
>Suppose this response is recieved through HTTPURLConnection object (i.e.
>the request itself was sent by HTTPURLConnect). Now if one extracts the
>value stored against hdrError by using getHeaderField() method of
>HTTPURLConnection object what will be the encoding assumed for the input
>string ?
>
>Reagrds,
>Sourav

Received on Wednesday, 20 February 2002 00:40:04 UTC