socketry / async-websocket

Asynchronous WebSocket client and server, supporting HTTP/1 and HTTP/2 for Ruby.
MIT License
166 stars 18 forks source link

Ensure h2 Websocket requests include :scheme #60

Closed zarqman closed 8 months ago

zarqman commented 11 months ago

This PR causes :scheme to be properly populated for http2 Websocket requests.

:scheme is presently showing up to the server as an empty string (which is odd, since I'd expect it to be nil instead--I did not chase this down).

According to RFC 8441, section 4, bullet 2, :scheme must be present for h2 WS requests (which contrasts to other uses of h2 CONNECT, where :scheme is expected to be omitted).

This also adds tests for the presence and validity of authority, path, and protocol.

Types of Changes

Contribution