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?
> c) Leaving it as it is for now.
>
> The default is to leave it as it is.
I'd be fine with that.
Mark