MCPcopy
hub / github.com/benoitc/gunicorn / _set_body_reader

Method _set_body_reader

gunicorn/asgi/uwsgi.py:121–130  ·  view source on GitHub ↗

Set up body state for async reading.

(self)

Source from the content-addressed store, hash-verified

119 return bytes(buf)
120
121 def _set_body_reader(self):
122 """Set up body state for async reading."""
123 content_length = 0
124 if 'CONTENT_LENGTH' in self.uwsgi_vars:
125 try:
126 content_length = max(int(self.uwsgi_vars['CONTENT_LENGTH']), 0)
127 except ValueError:
128 content_length = 0
129 self.content_length = content_length
130 self._body_remaining = content_length
131
132 async def read_body(self, size=8192):
133 """Read body chunk asynchronously.

Callers 1

_async_parseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected