proxy.http.parser.chunk module#

proxy.py#

⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging.

copyright
  1. 2013-present by Abhinav Singh and contributors.

license

BSD, see LICENSE for more details.

class proxy.http.parser.chunk.ChunkParser[source]#

Bases: object

HTTP chunked encoding response parser.

parse(raw: memoryview) memoryview[source]#
process(raw: bytes) Tuple[bool, memoryview][source]#
static to_chunks(raw: bytes, chunk_size: int = 131072) bytes[source]#
class proxy.http.parser.chunk.ChunkParserStates(WAITING_FOR_SIZE, WAITING_FOR_DATA, COMPLETE)#

Bases: tuple

COMPLETE: int#

Alias for field number 2

WAITING_FOR_DATA: int#

Alias for field number 1

WAITING_FOR_SIZE: int#

Alias for field number 0

_asdict()#

Return a new dict which maps field names to their values.

_field_defaults = {}#
_fields = ('WAITING_FOR_SIZE', 'WAITING_FOR_DATA', 'COMPLETE')#
classmethod _make(iterable)#

Make a new ChunkParserStates object from a sequence or iterable

_replace(**kwds)#

Return a new ChunkParserStates object replacing specified fields with new values