MCPcopy
hub / github.com/diffgram/diffgram / handle_chunking

Function handle_chunking

default/main.py:72–81  ·  view source on GitHub ↗

Sets the "wsgi.input_terminated" environment flag, thus enabling Werkzeug to pass chunked requests as streams. The gunicorn server should set this, but it's not yet been implemented.

()

Source from the content-addressed store, hash-verified

70
71@app.before_request
72def handle_chunking():
73 """
74 Sets the "wsgi.input_terminated" environment flag, thus enabling
75 Werkzeug to pass chunked requests as streams. The gunicorn server
76 should set this, but it's not yet been implemented.
77 """
78
79 transfer_encoding = request.headers.get("Transfer-Encoding", None)
80 if transfer_encoding == u"chunked":
81 request.environ["wsgi.input_terminated"] = True
82
83
84@app.after_request

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected