Broadway: http headers should not be parsed case sensitive
When broadwayd parses the header fields of the http request to create a websocket, it uses the names in a case sensitive form.
Actually http header should not be case sensitive.
Some proxy-server implementation (like in my case caddy2) somehow rewrites the Sec-WebSocket-Key
header to Sec-Websocket-Key
, which prevent the websocket connection.
Although I know it even not the best behavior to change the case of the headers in the first place, it is conform to the http standard.
Actually the function https://gitlab.gnome.org/GNOME/gtk/-/blob/master/gdk/broadway/broadway-server.c#L1021 should be rewritten to parse the header case-insensitive.
The actual problem arises here: https://gitlab.gnome.org/GNOME/gtk/-/blob/master/gdk/broadway/broadway-server.c#L1111
If you want to test this, you can use a simple caddyfile (see also https://caddyserver.com/docs/quick-starts/reverse-proxy) for reverse_proxy:
yourdomain.com
reverse_proxy 127.0.0.1:8085