I need to be able to send a custom HTTP header in the 101 Upgrade response (as part of WebSocket connection initialisation), around about here:
|
if let Some(protocol) = protocol { |
|
response.insert_header("Sec-Websocket-Protocol", protocol); |
|
} |
|
|
|
let http_res: &mut tide::http::Response = response.as_mut(); |
|
let upgrade_receiver = http_res.recv_upgrade().await; |
It'd be nice to be able to have some extension to the handler so that my code can do some work to add this header in, and have some extra connection-level state along with the WebSocketStream.
I need to be able to send a custom HTTP header in the
101 Upgraderesponse (as part of WebSocket connection initialisation), around about here:tide-websockets/src/handler.rs
Lines 175 to 180 in c3e1d98
It'd be nice to be able to have some extension to the
handlerso that my code can do some work to add this header in, and have some extra connection-level state along with theWebSocketStream.