Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep proxying all requested subprotocols #462

Merged

Conversation

consideRatio
Copy link
Member

@consideRatio consideRatio commented Mar 13, 2024

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!!

@consideRatio consideRatio force-pushed the pr/fix-regression-in-4.1.1 branch from 739d24b to 6cbcb2d Compare March 13, 2024 21:41
When jupyter-server-proxy proxies websockets, its finalizes the
websocket handshake between client/proxy before it initiates the
proxy/server websocket handshake.

In 4.1.1 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
jupyterhub#459.
@consideRatio consideRatio force-pushed the pr/fix-regression-in-4.1.1 branch from 6cbcb2d to f9d6fcd Compare March 13, 2024 21:56
@consideRatio consideRatio merged commit d7e158e into jupyterhub:main Mar 13, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant