RFR: 8298588: WebSockets: HandshakeUrlEncodingTest unnecessarily depends on a response body

Daniel Fuchs dfuchs at openjdk.org
Tue Dec 13 10:45:49 UTC 2022


On Fri, 2 Dec 2022 15:55:30 GMT, Michal Karm Babacek <duke at openjdk.org> wrote:

> According to [rfc6455](https://www.rfc-editor.org/rfc/rfc6455.html#section-5.5.1), the close frame MAY contain a body, i.e. it is considered [optional](https://www.rfc-editor.org/rfc/rfc2119#section-5). It seems that the contemporary JDK HEAD (tip) does populate the body and thus enables `HandshakeUrlEncodingTest.java` to parse its contents. On the contrary, JDK 11 does not populate the body in the same case. I would like to backport JDK-8245245 all the way to JDK 11, so I would like to change the behavior of this test so as it works across JDK versions.

Checking the response URI is good but for the mainline I'd advise to check both the response URI and the body. It's fine to not check the response body on the update releases where [JDK-8240666](https://bugs.openjdk.org/browse/JDK-8240666) is not present.

Whether you want to backport [JDK-8240666](https://bugs.openjdk.org/browse/JDK-8240666) or not is an independent and unrelated decision - IMO.

-------------

PR: https://git.openjdk.org/jdk/pull/11486


More information about the net-dev mailing list