jsr356-experts@websocket-spec.java.net

[jsr356-experts] Header Representation

From: Danny Coward <danny.coward_at_oracle.com>
Date: Sun, 03 Feb 2013 18:51:32 -0800

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
b) Providing some easy utility methods for parsing common websocket
headers (like extensions ?)
c) Leaving it as it is for now.

The default is to leave it as it is.

- Danny


-- 
<http://www.oracle.com> 	*Danny Coward *
Java EE
Oracle Corporation