http_parser

Module Contents

Classes

ParseState()
ChunkState()
HttpParser(self,protocol=None,loop=None,max_line_size=8190,max_headers=32768,max_field_size=8190,timer=None,code=None,method=None,readall=False,payload_exception=None,response_with_body=True,read_until_eof=False,auto_decompress=True)
HttpRequestParserPy() Read request status line. Exception .http_exceptions.BadStatusLine
HttpResponseParserPy() Read response status line and headers.
HttpPayloadParser(self,payload,length=None,chunked=False,compression=None,code=None,method=None,readall=False,response_with_body=True,auto_decompress=True)
DeflateBuffer(self,out,encoding) DeflateStream decompress stream and feed data into specified stream.
class ParseState
class ChunkState
class HttpParser(protocol=None, loop=None, max_line_size=8190, max_headers=32768, max_field_size=8190, timer=None, code=None, method=None, readall=False, payload_exception=None, response_with_body=True, read_until_eof=False, auto_decompress=True)
__init__(protocol=None, loop=None, max_line_size=8190, max_headers=32768, max_field_size=8190, timer=None, code=None, method=None, readall=False, payload_exception=None, response_with_body=True, read_until_eof=False, auto_decompress=True)
feed_eof()
feed_data(data, SEP=None, EMPTY=None, CONTENT_LENGTH=None, METH_CONNECT=None, SEC_WEBSOCKET_KEY1=None)
parse_headers(lines)

Parses RFC 5322 headers from a stream.

Line continuations are supported. Returns list of header name and value pairs. Header name is in upper case.

class HttpRequestParserPy

Read request status line. Exception .http_exceptions.BadStatusLine could be raised in case of any errors in status line. Returns RawRequestMessage.

parse_message(lines)
class HttpResponseParserPy

Read response status line and headers.

BadStatusLine could be raised in case of any errors in status line. Returns RawResponseMessage

parse_message(lines)
class HttpPayloadParser(payload, length=None, chunked=False, compression=None, code=None, method=None, readall=False, response_with_body=True, auto_decompress=True)
__init__(payload, length=None, chunked=False, compression=None, code=None, method=None, readall=False, response_with_body=True, auto_decompress=True)
feed_eof()
feed_data(chunk, SEP=None, CHUNK_EXT=None)
class DeflateBuffer(out, encoding)

DeflateStream decompress stream and feed data into specified stream.

__init__(out, encoding)
set_exception(exc)
feed_data(chunk, size)
feed_eof()
begin_http_chunk_receiving()
end_http_chunk_receiving()