dev@jsr311.java.net

Re: Parsing headers, was: Abstract from HTTP <was> Re: Welcome to JSR 311

From: Julian Reschke <julian.reschke_at_gmx.de>
Date: Tue, 10 Apr 2007 14:02:47 +0200

Jerome Louvel schrieb:
>>> I would suggest the following approach:
>>>
>>> public void setTags(@Context("header.Slug") List<String> tags){
>>> ...
>>> }
>> You lost me here. "Slug" is not of type list...
>
> Sorry, I wrongly assumed that "Slug" was a repeating header. Let's consider
> this solution for a truly repeating header instead.
>
> RFC2047:
>> It adds the ability to represent non-ISO8859 characters in headers.
>
> OK. Is it compatible with the HTTP 1.1 specification of headers?
>
> Best regards,
> Jerome

HTTP/1.1 says in
<http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.2.2.p.7>:

"The TEXT rule is only used for descriptive field contents and values
that are not intended to be interpreted by the message parser. Words of
*TEXT MAY contain characters from character sets other than ISO-8859-1
[22] only when encoded according to the rules of RFC 2047 [14]."

Best regards, Julian