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

Method finish

gunicorn/asgi/parser.py:249–260  ·  view source on GitHub ↗

Mark parsing complete for EOF handling. Call when no more data will be received. Handles edge cases like chunked encoding without final trailer CRLF.

(self)

Source from the content-addressed store, hash-verified

247 self._header_count = 0
248
249 def finish(self):
250 """Mark parsing complete for EOF handling.
251
252 Call when no more data will be received. Handles edge cases like
253 chunked encoding without final trailer CRLF.
254 """
255 if self._state == 'chunked' and self._chunk_state == 'trailer':
256 # All body data received, just missing final CRLF
257 self._state = 'complete'
258 self.is_complete = True
259 if self._on_message_complete:
260 self._on_message_complete()
261
262 def _parse_proxy_protocol(self):
263 """Parse PROXY protocol header if enabled.

Callers 1

checkMethod · 0.95

Calls 1

_on_message_completeMethod · 0.80

Tested by

no test coverage detected