gstreamer/subprojects/gst-examples/webrtc/janus
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
..
rust examples: webrtc/janus/rust: add mandatory ws HTTP request headers 2023-03-22 09:48:28 +00:00
janusvideoroom.py Change GstSdp.sdp_message_parse_buffer to GstSdp.SDPMessage.new_from_text in examples 2022-12-16 10:40:41 +00:00