librelist archives

« back to archive

How to get wsgi.input?

How to get wsgi.input?

From:
james hedley
Date:
2015-06-23 @ 19:28
Hi

I'd like to get at the bare wsgi.input reference and wrap it myself.
Looking at the code, there seems to be more than one way to do this in
get_input_stream():

if environ.get('wsgi.input_terminated'):
        return stream

if content_length is None:
        return safe_fallback and _empty_stream or stream

I can't figure out how I'm suppose to actually use these features
though! know I can set the wsgi environment if I'm using a proper
server like Apache. But how do I do it under the Flask dev server,
given that Werkzeug hard codes its wsgi environment in
werkzeug.serving.make_environ()?

With safe_fallback, how is it envisioned that I could turn this on?

Any help or advice appreciated...

Cheers,

James