socketry / async-websocket

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

Fix arguments to 404 response #63

Closed emlove closed 8 months ago

emlove commented 8 months ago

Types of Changes

Contribution

The second argument is the headers field, and it's actually a hash type. Sending an empty array breaks parsing further down the line when trying to look up hash values by key. This change just lets the default argument values be used.

See: https://github.com/rails/rails/blob/c80fa6a0697656a522b7688d116a9a6fca1fc0fd/actionpack/lib/action_dispatch/http/response.rb#L169

Stacktrace:

image