On 2/4/13 2:46 AM, Mark Thomas wrote:
> On 04/02/2013 02:51, Danny Coward wrote:
>> Hi folks,
>>
>> Another quickie here: we had a suggestion to use the MultiValuedMap from
>> JAX-RS to represent Http Headers in our Handshake Request/Response
>>
>> http://java.net/jira/browse/WEBSOCKET_SPEC-97
>> http://docs.oracle.com/javaee/6/api/javax/ws/rs/core/MultivaluedMap.html
>>
>> which also models headers as Map<String, List<String>> (as does good old
>> HttpURLConnection), but contains a few useful utility methods.
>>
>> I know this is a bit of an unsolved mystery which the JDK ought to solve
>> better by now, but what are folks' thoughts on
>>
>> a) relying on a JAX-RS API and gaining some useful utility methods
> I don't think those few utility methods are anywhere near useful enough
> to add a dependency on the JAX-RS API to the WebSocket implementation.
>
>> b) Providing some easy utility methods for parsing common websocket
>> headers (like extensions ?)
> Isn't that an implementation concern rather than a user concern?
There's certainly all the information there, so developers can invent
whatever utility methods they like.
The hardest part of standard websocket header parsing is extensions, and
we implicitly have that in the API.
>
>> c) Leaving it as it is for now.
>>
>> The default is to leave it as it is.
> I'd be fine with that.
OK then we will leave it unless I hear strong support from others.
- Danny
>
> Mark
>
--
<http://www.oracle.com> *Danny Coward *
Java EE
Oracle Corporation