Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8298588

WebSockets: HandshakeUrlEncodingTest unnecessarily depends on a response body

XMLWordPrintable

    • b03
    • generic
    • generic

        According to rfc6455[1], the close frame MAY contain a body, i.e. it is considered optional. Although, due to JDK-8240666, in most recent JDKs the request body is being populated. HandshakeUrlEncodingTest.java introduced with JDK-8245245 relies on the fact that a body is being populated and parses its contents.

        However, older JDKs (e.g. JDK 11) do not populate the body and the test wrongly fails for that reason. It would be better to model the test according to the optional nature of a content body being present or not, without sacrificing assertions the test was meant to do (verify a fix of JDK-8245245 is present).

        [1] https://www.rfc-editor.org/rfc/rfc6455.html#section-5.5.1

              sgehwolf Severin Gehwolf
              sgehwolf Severin Gehwolf
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: