gstreamer/subprojects/gst-examples/webrtc/janus/rust
François Laignel 1abc8aa733 examples: webrtc/janus/rust: add mandatory ws HTTP request headers
Trying to run the `janus` Rust `gst-example`, `tungstenite` reports:

> Missing, duplicated or incorrect header sec-websocket-key

Indeed, all mandatory headers from the following list are missing
(code from `tungstenite:🤝:client::generate_request`):

```rust
const WEBSOCKET_HEADERS: [&str; 5] =
    ["Host", "Connection", "Upgrade", "Sec-WebSocket-Version", KEY_HEADERNAME];
```

These headers are mandatory for the websocket handshake. This feature is
selected by async-tungstenite.

Prior to this commit, the HTTP request was created with the header
"Sec-WebSocket-Protocol" only. Delegating the request creation to tungstenite
adds the missing headers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4240>
2023-03-22 09:48:28 +00:00
..
src examples: webrtc/janus/rust: add mandatory ws HTTP request headers 2023-03-22 09:48:28 +00:00
Cargo.lock examples: webrtc/janus/rust: add mandatory ws HTTP request headers 2023-03-22 09:48:28 +00:00
Cargo.toml examples: webrtc: rust: Update to gstreamer-rs 0.20 2023-02-10 11:43:00 +00:00