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

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 10 Apr 2007 16:43:14 +0200

Julian Reschke wrote:
>> Accept: foo/bar;ext="a,b", text/plain
>> To return to your example, the fact that "a,b" is a quotes string
>> indicates
>> to the header parser that the comma should be ignored as a general header
>> separator.
> Jerome,
> that's understood. The trouble here is that this means that it's
> impossible to split a list-typed header into its components without
> knowledge of the syntax of the individual components.

Right. One would have to specify a type e.g.

   @HeaderParam("Accept") List<MediaType> types

such that either the type or the runtime via the type knows how to
process the components of the list.


| ? + ? = To question
    Paul Sandoz