websocket-spec
  1. websocket-spec
  2. WEBSOCKET_SPEC-220

Spec should explicitly specify the behaviour of encoders when a sub class is returned

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Labels:
      None

      Description

      I have had a user file an issue because when attempting to match encoders I am only considering the encoder if the type to encoded exactly matches the encoder type (https://issues.jboss.org/browse/UNDERTOW-166).

      The user was expecting that if they returned a sub class of a class for which there was an encoder registered from their @OnMessage method it would also be handed by the encoder.

      As far as I can tell the spec does not really say anything about this situation, so I think it would be good to clarify what the intended behaviour is.

        Activity

        Hide
        markt_asf added a comment -

        For the record, Tomcat uses isAssignableFrom() rather than an exact match in this case. I don't see anything in the EG archives that indicates an explicit intention.

        Show
        markt_asf added a comment - For the record, Tomcat uses isAssignableFrom() rather than an exact match in this case. I don't see anything in the EG archives that indicates an explicit intention.
        Hide
        Pavel Bucek added a comment -

        Tyrus (glassfish/weblogic) also does isAssignableFrom(). Same as Mark, I was not able to find anything in the spec or archives which would state how it should work, but I don't see any reason why we should limit it to exact match.

        Show
        Pavel Bucek added a comment - Tyrus (glassfish/weblogic) also does isAssignableFrom(). Same as Mark, I was not able to find anything in the spec or archives which would state how it should work, but I don't see any reason why we should limit it to exact match.
        Hide
        stuartdouglas added a comment -

        In that case I will change the Undertow behaviour to match.

        Show
        stuartdouglas added a comment - In that case I will change the Undertow behaviour to match.

          People

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

            Dates

            • Created:
              Updated: