HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/aiohttp/__pycache__/http_exceptions.cpython-310.pyc
o

���g��@s�dZddlmZddlmZmZddlmZdZGdd�de	�Z
Gd	d
�d
e
�ZGdd�de�ZGd
d�de�Z
Gdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZdS) z"Low-level http related exceptions.�)�indent)�Optional�Union�)�_CIMultiDict)�HttpProcessingErrorc	@sdeZdZdZdZdZdZdddd�deede	dee
d	dfd
d�Zd	e	fdd
�Zd	e	fdd�Z
dS)rz�HTTP 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
    r�N)�code�message�headersr	r
r�returncCs|dur||_||_||_dS)N)r	rr
)�selfr	r
r�r�B/usr/local/lib/python3.10/dist-packages/aiohttp/http_exceptions.py�__init__s
zHttpProcessingError.__init__cCst|jd�}|j�d|��S)Nz  z, message:
)rr
r	)r
�msgrrr�__str__%szHttpProcessingError.__str__cCs d|jj�d|j�d|j�d�S)N�<z: z
, message=�>)�	__class__�__name__r	r
)r
rrr�__repr__)s zHttpProcessingError.__repr__)r�
__module__�__qualname__�__doc__r	r
rr�int�strrrrrrrrrrs&	����
�rcs<eZdZdZdZdd�dedeeddf�fdd	�Z�Z	S)
�BadHttpMessage��Bad RequestN)rr
rrcst�j||d�|f|_dS)N)r
r��superr�args)r
r
r�rrrr2szBadHttpMessage.__init__)
rrrr	r
rrrr�
__classcell__rrr#rr-s,rc@seZdZdZdZdS)�HttpBadRequestrrN)rrrr	r
rrrrr%7sr%c@�eZdZdZdS)�PayloadEncodingErrorzBase class for payload errorsN�rrrrrrrrr'=�r'c@r&)�ContentEncodingErrorzContent encoding error.Nr(rrrrr*Ar)r*c@r&)�TransferEncodingErrorztransfer encoding error.Nr(rrrrr+Er)r+c@r&)�ContentLengthErrorz2Not enough data for satisfy content length header.Nr(rrrrr,Ir)r,c	s2eZdZ	d	dedededdf�fdd�
Z�ZS)
�LineTooLong�Unknown�line�limit�actual_sizerNc	s0t��d|�d|�d|�d��|||f|_dS)NzGot more than z bytes (z) when reading �.r )r
r/r0r1r#rrrNs�zLineTooLong.__init__)r.r.)rrrrrr$rrr#rr-Ms�����r-cs.eZdZdeeefddf�fdd�Z�ZS)�
InvalidHeader�hdrrNcs>t|t�r|jdd�n|}t��d|���||_|f|_dS)N�backslashreplace)�errorszInvalid HTTP header: )�
isinstance�bytes�decoder!rr4r")r
r4�hdr_sr#rrrXszInvalidHeader.__init__)rrrrr8rrr$rrr#rr3Ws&r3cs0eZdZddedeeddf�fdd�
Z�ZS)	�
BadStatusLinerNr/�errorrcs:t|t�s	t|�}t��|pd|���|f|_||_dS)NzBad status line )r7r�reprr!rr"r/�r
r/r<r#rrr`s


zBadStatusLine.__init__�rN)rrrrrrr$rrr#rr;_s(r;cs4eZdZdZd	dedeeddf�fdd�
Z�ZS)
�
BadHttpMethodz#Invalid HTTP method in status line.rNr/r<rcst��||p
d|���dS)NzBad HTTP method in status line )r!rr>r#rrrkszBadHttpMethod.__init__r?)rrrrrrrr$rrr#rr@hs(r@c@seZdZdS)�InvalidURLErrorN)rrrrrrrrAosrAN)r�textwrapr�typingrr�typedefsr�__all__�	Exceptionrrr%r'r*r+r,r-r3r;r@rArrrr�<module>s""