diff --git a/lib/puma/client.rb b/lib/puma/client.rb index 5960f18292..0f6ab7e9a2 100644 --- a/lib/puma/client.rb +++ b/lib/puma/client.rb @@ -122,9 +122,9 @@ def inspect "#" end - # For the hijack protocol (allows us to just put the Client object - # into the env) - def call + # For the full hijack protocol, `env['rack.hijack']` is set to + # `client.method :full_hijack` + def full_hijack @hijacked = true env[HIJACK_IO] ||= @io end diff --git a/lib/puma/request.rb b/lib/puma/request.rb index 581ef43b2a..469d6d237e 100644 --- a/lib/puma/request.rb +++ b/lib/puma/request.rb @@ -53,7 +53,6 @@ def handle_request(client, requests) socket = client.io # io may be a MiniSSL::Socket app_body = nil - return false if closed_socket?(socket) if client.http_content_length_limit_exceeded @@ -69,7 +68,7 @@ def handle_request(client, requests) end env[HIJACK_P] = true - env[HIJACK] = client + env[HIJACK] = client.method :full_hijack env[RACK_INPUT] = client.body env[RACK_URL_SCHEME] ||= default_server_port(env) == PORT_443 ? HTTPS : HTTP