New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set env['rack.hijack'] to client.method(:full_hijack) instead of client instance #3073
base: master
Are you sure you want to change the base?
Conversation
So we don't pass the client object
647e406
to
08ca286
Compare
The object that we put into |
I'm not sure I understand this part. |
I'm 👍 for this change (though we may want to wait a few weeks to merge, let's let the next release bake a bit and see if it will be Puma 7 or not...) |
I see what this does (and if you only call |
Correct. The only requirement (from the Rack spec) is that the object responds to
I'll rephrase or just remove. There are a few Re the public API, Puma is much better than it used to be. I think minimal public API's are best, as they allow more flexibility with refactors, optimizations, etc. Two considerations though, are they too restrictive for the user, and do they force test code to have too many hacks. I consider things like EDIT: Revised the opening comment |
Description
Currently,
Puma::Request
setsenv['rack.hijack']
to thePuma::Client
instance. Instead of using the client instance, pass a method object that responds tocall
.The Rack spec for the object passed in
env['rack.hijack']
is that it must respond tocall
. Also,Puma::Client
is a ':nodoc:` class, so it shouldn't be considered part of Puma's public API. Hence, there is no reason to pass it to the app.Your checklist for this pull request
[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.