From 12448944e9649e88f93d3ded1bbac162c5d39347 Mon Sep 17 00:00:00 2001 From: Emily Love Mills Date: Fri, 8 Dec 2023 19:50:52 -0600 Subject: [PATCH] Fix arguments to 404 response 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. --- lib/async/websocket/adapters/rails.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/async/websocket/adapters/rails.rb b/lib/async/websocket/adapters/rails.rb index 9e635e8..0b6e764 100644 --- a/lib/async/websocket/adapters/rails.rb +++ b/lib/async/websocket/adapters/rails.rb @@ -13,7 +13,7 @@ def self.open(request, **options, &block) if response = Rack.open(request.env, **options, &block) ::Rack::Response[*response] else - ::ActionDispatch::Response.new(404, [], []) + ::ActionDispatch::Response.new(404) end end end