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

Use tied file handle for STDIN #3

Merged
merged 3 commits into from Sep 18, 2013
Merged

Conversation

waldiTM
Copy link

@waldiTM waldiTM commented Aug 8, 2013

Some PSGI server don't provide a file handle for input and errors.
They need to be tied to a file handle to be properly used.

Some PSGI server don't provide a file handle for input and errors.
They need to be tied to a file handle to be properly used.
@miyagawa
Copy link
Collaborator

miyagawa commented Aug 8, 2013

Can you write test for this, or how to reproduce the bug you're trying to fix?

@waldiTM
Copy link
Author

waldiTM commented Aug 8, 2013

In uwsgi the stream on psgi.input (and also on psgi.error, but that is no real problem) is no file handle, but a simple class with a read method, so it can't be assigned directly to *STDIN.
A test can create a simple class and see if it can be actually used as STDIN inside of the handler.

@miyagawa
Copy link
Collaborator

miyagawa commented Aug 8, 2013

Write that test.

@miyagawa
Copy link
Collaborator

miyagawa commented Aug 8, 2013

You can add a test and push to the branch, no need to close and reopen a new pull request. Thanks!

Bastian Blank added 2 commits August 8, 2013 22:38
Some PSGI server don't provide a file handle for input and errors.
They need to be tied to a file handle to be properly used.
@waldiTM
Copy link
Author

waldiTM commented Aug 8, 2013

Done. And also added the tie for the errors stream.

@waldiTM
Copy link
Author

waldiTM commented Sep 16, 2013

Any news on this?

miyagawa added a commit that referenced this pull request Sep 18, 2013
Use tied file handle for STDIN
@miyagawa miyagawa merged commit 14d9acf into tokuhirom:master Sep 18, 2013
miyagawa added a commit that referenced this pull request Aug 31, 2014
This reverts commit 14d9acf, reversing
changes made to 0f0cd2b.

Conflicts:
	lib/CGI/Emulate/PSGI.pm
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

3 participants