Keep proxying all requested subprotocols #462
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When jupyter-server-proxy proxies websockets, its finalizes the websocket handshake between client/proxy before it initiates the proxy/server websocket handshake.
In #458 released with 4.1.1 earlier today the thinking was that it was a better compromise to not forward all subprotocol choices in the proxy/server handshake if we had prematurely picked a single choice in the client/proxy handshake. This turns out to have introduced a regression though, as at least bokeh had been using secondary subprotocol choices to pass other information such as base64 encoded JSON with keys like
session_id
,session_expiry
and__bk__zlib_
.This commit makes sure we keep passing all requested subprotocols, even though we have prematurely picked a specific ahead of time - which is a bug tracked in #459. With this bug, we just have to pick the less buggy workaround, which may be to proxy all requested subprotocols.
Thank you @rcthomas for reporting this so quickly after 4.1.1 in #459!!