Hey team,

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.

Is it right to say that we shouldn't close the exchange in this situation?
Just to clarify, this is *not* a request for adding an implementation of
the websocket protocol to the module.

The fix would would be:

   - Check request connection header to see if it is an upgrade request
   - If so, set getRequestBody/getResponseBody to return the raw streams
   - flush (but don't close) the outputstream when sending a 101 status code

I am willing to contribute this myself. (Indeed I already have the changes
on my local)

-- 
Cheers, Josiah.

Reply via email to