Skip to content
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

Allow calling close on rack.input. #1956

Merged
merged 3 commits into from Aug 29, 2022
Merged

Allow calling close on rack.input. #1956

merged 3 commits into from Aug 29, 2022

Conversation

ioquatix
Copy link
Member

@ioquatix ioquatix commented Aug 29, 2022

My guess is this is a hang-over from CGI stdin/stdout model. It's advantageous to close the input if you don't need it to free any associated resources as soon as possible. I can't find any reason/justification as to why this is the way it is.

Copy link
Contributor

@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this change in principle. I think the reason that close was not allowed originally is that it would have broken rewindable input. Now that input need not be rewindable, closing the input should be fine.

See inline note about the specs.

test/spec_lint.rb Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants