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

wsgiref.simple_server.make_server support #1

Closed
yohanboniface opened this issue Jan 15, 2016 · 3 comments
Closed

wsgiref.simple_server.make_server support #1

yohanboniface opened this issue Jan 15, 2016 · 3 comments

Comments

@yohanboniface
Copy link
Owner

It does not work at the moment when serving falcon with wsgiref.simple_server.make_server.

Roughly, this gives an io.BufferedReader instance as request body (req.stream in falcon), which seems to consume all the stream when calling readline on it (which is what cgi does on FieldStorage.parse_multi).

@kojimaeiji
Copy link
Contributor

i fixed this in #5.

@yunfan
Copy link

yunfan commented Apr 18, 2017

the patch not work
but you could add the bellow line to let it work

from StringIO import StringIO
new_stream = StringIO(req.stream.read())
form = self.parse(stream=new_stream, environ=req.env) 

but this method will duplicate the memory usage i think
which might cause problem while processing large file uploading, also it break the streamming processing

@yohanboniface
Copy link
Owner Author

Should be fixed by #10

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

No branches or pull requests

3 participants