<div dir="ltr"><div>Hey team, </div><div><br></div><div>I was trying to manually implement a WebSocket using the jdk.httpserver module, but it seems that when I use sendHeaders to send a 101 status code, the request is terminated and the streams are closed, preventing me from reading/sending websocket frames.</div><div><br></div><div>Is it right to say that we shouldn't close the exchange in this situation? Just to clarify, this is <b>not</b> a request for adding an implementation of the websocket protocol to the module.</div><div><br></div><div>The fix would would be:</div><div><ul><li>Check request connection header to see if it is an upgrade request</li><li>If so, set getRequestBody/getResponseBody to return the raw streams</li><li>flush (but don't close) the outputstream when sending a 101 status code</li></ul></div><div>I am willing to contribute this myself. (Indeed I already have the changes on my local)</div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Cheers, Josiah.</div></div><input name="virtru-metadata" type="hidden" value="{"email-policy":{"disableCopyPaste":false,"disablePrint":false,"disableForwarding":false,"enableNoauth":false,"expandedWatermarking":false,"expires":false,"sms":false,"expirationNum":1,"expirationUnit":"days","expirationDate":"2025-09-04T01:11:03.867Z","isManaged":false,"persistentProtection":false},"attachments":{},"compose-id":"1","compose-window":{"secure":false}}"></div>