You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I try to connect to format!("{}?query=param", server.uri()) with tokio-tungstenite connect_async I get a 400 bad request. If I then try to connect with format!("{}/path?query=param", server.uri()) it works.
I think it should be perfectly fine to use query parameters in a websocket without a path parameter also present - but I'm not 100% on that and google isn't very helpful (results are mainly JS people asking if query parameters exist with websockets...). Hence the discussion not an issue.
It seems tungstenite works as I'd expect because if I just change the addr to one not present I get a connection refused so it is connecting to axum and getting the bad request back not trying to substitute it's own thing (afaict)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
If I try to connect to
format!("{}?query=param", server.uri())
with tokio-tungstenite connect_async I get a 400 bad request. If I then try to connect withformat!("{}/path?query=param", server.uri())
it works.I think it should be perfectly fine to use query parameters in a websocket without a path parameter also present - but I'm not 100% on that and google isn't very helpful (results are mainly JS people asking if query parameters exist with websockets...). Hence the discussion not an issue.
It seems tungstenite works as I'd expect because if I just change the addr to one not present I get a connection refused so it is connecting to axum and getting the bad request back not trying to substitute it's own thing (afaict)
axum version
0.8.1
Beta Was this translation helpful? Give feedback.
All reactions