MCPcopy
hub / github.com/urllib3/urllib3 / __init__

Method __init__

src/urllib3/response.py:313–320  ·  view source on GitHub ↗
(self, modes: str)

Source from the content-addressed store, hash-verified

311 max_decode_links = 5
312
313 def __init__(self, modes: str) -> None:
314 encodings = [m.strip() for m in modes.split(",")]
315 if len(encodings) > self.max_decode_links:
316 raise DecodeError(
317 "Too many content encodings in the chain: "
318 f"{len(encodings)} > {self.max_decode_links}"
319 )
320 self._decoders = [_get_decoder(e) for e in encodings]
321
322 def flush(self) -> bytes:
323 return self._decoders[0].flush()

Callers

nothing calls this directly

Calls 2

DecodeErrorClass · 0.85
_get_decoderFunction · 0.85

Tested by

no test coverage detected