Viewing File: /opt/alt/python35/lib64/python3.5/site-packages/aiohttp/__pycache__/http_exceptions.cpython-35.pyc



Z@sdZdZGdddeZGdddeZGdddeZGdddeZGd	d
d
eZGdddeZGd
ddeZ	GdddeZ
GdddeZGdddeZGdddeZ
dS)z"Low-level http related exceptions.HttpProcessingErrorc	sLeZdZdZdZdZdZddddddfdd	ZS)
rzHTTP error.

    Shortcut for raising HTTP errors with custom code, message and headers.

    code: HTTP Error code.
    message: (optional) Error message.
    headers: (optional) Headers to be sent in response, a list of pairs
    NcodemessageheaderscsH|dk	r||_||_||_tjd|j|fdS)Nz%s, message='%s')rrrsuper__init__)selfrrr)	__class__/http_exceptions.pyrs
			zHttpProcessingError.__init__)__name__
__module____qualname____doc__rrrrrr)r
rrs
cs4eZdZdZdZddfddZS)BadHttpMessageizBad RequestrNcstjd|d|dS)Nrr)rr)r	rr)r
rrr"szBadHttpMessage.__init__)r
rrrrrrr)r
rrsrc@seZdZdZdZdS)HttpBadRequestizBad RequestN)r
rrrrrrrrr&src@seZdZdZdS)PayloadEncodingErrorzBase class for payload errorsN)r
rrrrrrrr,src@seZdZdZdS)ContentEncodingErrorzContent encoding error.N)r
rrrrrrrr0src@seZdZdZdS)TransferEncodingErrorztransfer encoding error.N)r
rrrrrrrr4src@seZdZdZdS)ContentLengthErrorz2Not enough data for satisfy content length header.N)r
rrrrrrrr8srcs%eZdZdfddZS)LineTooLongZUnknowncstjd||fdS)Nz'Got more than %s bytes when reading %s.)rr)r	linelimit)r
rrr>s	zLineTooLong.__init__)r
rrrrr)r
rr<srcs"eZdZfddZS)
InvalidHeadercsGt|tr!|jdd}tjdj|||_dS)Nzutf-8surrogateescapezInvalid HTTP Header: {})
isinstancebytesdecoderrformathdr)r	r )r
rrrEszInvalidHeader.__init__)r
rrrrr)r
rrCsrc@seZdZdddZdS)
BadStatusLinercCs+|st|}|f|_||_dS)N)reprargsr)r	rrrrrNszBadStatusLine.__init__N)r
rrrrrrrr!Lsr!c@seZdZdS)InvalidURLErrorN)r
rrrrrrr$Usr$N)r)r__all__	Exceptionrrrrrrrrrr!r$rrrr<module>s			
Back to Directory File Manager