websocket-spec
  1. websocket-spec
  2. WEBSOCKET_SPEC-97

Consider using jax-rs MultiValueMap to represent Http headers in the handshake request and response

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      as synopsis.

      Of not, will need to clarify the representation of http headers like this:-

      headernameA: value1
      headernameA: value2

      should it be represented as

      headernameA: value1, value2

      ?

        Activity

        Hide
        dannycoward added a comment -

        I raised the possibility of using the JAX-RS multvaluedmap for headers on the expert group, it seems the sentiment is that for the couple of utility methods, its not worth the websocket spec building a dependency on that API. So we will keep the headers as they are.

        Show
        dannycoward added a comment - I raised the possibility of using the JAX-RS multvaluedmap for headers on the expert group, it seems the sentiment is that for the couple of utility methods, its not worth the websocket spec building a dependency on that API. So we will keep the headers as they are.
        Hide
        jitu added a comment -

        MultivaluedMap is just a sub type of Map<String, List<String>> and it adds some utility methods like getFirst(K key).

        Other than that, MultivaluedMap doesn't give any other serialization semantics as mentioned in the report. As far as HTTP is considered, both forms are equivalent. API doesn't have to prefer one form over the other.

        Show
        jitu added a comment - MultivaluedMap is just a sub type of Map<String, List<String>> and it adds some utility methods like getFirst(K key). Other than that, MultivaluedMap doesn't give any other serialization semantics as mentioned in the report. As far as HTTP is considered, both forms are equivalent. API doesn't have to prefer one form over the other.

          People

          • Assignee:
            dannycoward
            Reporter:
            dannycoward
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved: