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

Class ASGIResponseInfo

gunicorn/asgi/protocol.py:146–159  ·  view source on GitHub ↗

Simple container for ASGI response info for access logging.

Source from the content-addressed store, hash-verified

144
145
146class ASGIResponseInfo:
147 """Simple container for ASGI response info for access logging."""
148
149 def __init__(self, status, headers, sent):
150 self.status = status
151 self.sent = sent
152 # Convert headers to list of string tuples for logging
153 self.headers = []
154 for name, value in headers:
155 if isinstance(name, bytes):
156 name = name.decode("latin-1")
157 if isinstance(value, bytes):
158 value = value.decode("latin-1")
159 self.headers.append((name, value))
160
161
162class BodyReceiver:

Calls

no outgoing calls

Tested by 2