� D�g� ���dZddlmZddlmZmZddlmZdZGd�de ��Z Gd �d e ��Z Gd �d e ��Z Gd �de ��Z Gd�de ��ZGd�de ��ZGd�de ��ZGd�de ��ZGd�de ��ZGd�de ��ZGd�de��ZGd�de ��ZdS) z"Low-level http related exceptions.�)�indent)�Optional�Union�)� _CIMultiDict)�HttpProcessingErrorc �p�eZdZdZdZdZdZdddd�deede dee d dfd �Z d e fd �Z d e fd �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 �returnc�4�|�||_||_||_dS)N)r r r )�selfr r r s �g/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/aiohttp/http_exceptions.py�__init__zHttpProcessingError.__init__s#�� � ��D�I��� ��� � � �c�D�t|jd��}|j�d|��S)Nz z , message: )rr r )r�msgs r�__str__zHttpProcessingError.__str__%s)���T�\�4�(�(���)�.�.��.�.�.rc�B�d|jj�d|j�d|j�d�S)N�<z: z , message=�>)� __class__�__name__r r )rs r�__repr__zHttpProcessingError.__repr__)s,��T�4�>�*�T�T�d�i�T�T�4�<�T�T�T�Tr)r� __module__� __qualname__�__doc__r r r r�int�strrrrr�rrrr s��������� �D��G��G� #��*.� � � ��s�m� �� � �,�'� � � � � � �/��/�/�/�/�U�#�U�U�U�U�U�Urrc�F��eZdZdZdZdd�dedeeddf�fd�Z�xZ S) �BadHttpMessage�� Bad RequestN)r r r rc�^��t���||���|f|_dS)N)r r ��superr�args)rr r rs �rrzBadHttpMessage.__init__2s-��� ������'��:�:�:��J�� � � r) rrrr r r!rrr� __classcell__�rs@rr$r$-so������� �D��G�JN�������,�1G��SW����������rr$c��eZdZdZdZdS)�HttpBadRequestr%r&N)rrrr r r"rrr.r.7s������ �D��G�G�Grr.c��eZdZdZdS)�PayloadEncodingErrorzBase class for payload errorsN�rrrrr"rrr0r0=s������'�'�'�'rr0c��eZdZdZdS)�ContentEncodingErrorzContent encoding error.Nr1r"rrr3r3As������!�!�!�!rr3c��eZdZdZdS)�TransferEncodingErrorztransfer encoding error.Nr1r"rrr5r5Es������"�"�"�"rr5c��eZdZdZdS)�ContentLengthErrorz2Not enough data for satisfy content length header.Nr1r"rrr7r7Is������<�<�<�<rr7c �4��eZdZ ddedededdf�fd� Z�xZS) � LineTooLong�Unknown�line�limit� actual_sizerNc �r��t���d|�d|�d|�d���|||f|_dS)NzGot more than z bytes (z) when reading �.r()rr;r<r=rs �rrzLineTooLong.__init__NsS��� ����� O�U� O� O�K� O� O�� O� O� O� � � ��5�+�.�� � � r)r:r:)rrrr!rr+r,s@rr9r9Mse�������DM�/�/��/� #�/�>A�/� �/�/�/�/�/�/�/�/�/�/rr9c�8��eZdZdeeefddf�fd� Z�xZS)� InvalidHeader�hdrrNc����t|t��r|�d���n|}t���d|����||_|f|_dS)N�backslashreplace)�errorszInvalid HTTP header: )� isinstance�bytes�decoder)rrBr*)rrB�hdr_srs �rrzInvalidHeader.__init__Xsa���9C�C��9O�9O�X�� � �"4� �5�5�5�UX�� �����8��8�8�9�9�9�����F�� � � r)rrrrrGr!rr+r,s@rrArAWsT��������E�%��*�-��$����������rrAc�:��eZdZddedeeddf�fd� Z�xZS)� BadStatusLiner Nr;�errorrc���t|t��st|��}t���|pd|����|f|_||_dS)NzBad status line )rFr!�reprr)rr*r;�rr;rLrs �rrzBadStatusLine.__init__`sZ����$��$�$� ���:�:�D� ������=�"=�T�"=�"=�>�>�>��G�� ��� � � r�r N)rrrr!rrr+r,s@rrKrK_s[���������S��h�s�m��t����������rrKc�>��eZdZdZddedeeddf�fd� Z�xZS) � BadHttpMethodz#Invalid HTTP method in status line.r Nr;rLrc�V��t���||pd|����dS)NzBad HTTP method in status line )r)rrOs �rrzBadHttpMethod.__init__ks1��� ������u�R�(R�$�(R�(R�S�S�S�S�SrrP)rrrrr!rrr+r,s@rrRrRhso�������-�-�T�T�S�T�h�s�m�T�t�T�T�T�T�T�T�T�T�T�TrrRc��eZdZdS)�InvalidURLErrorN)rrrr"rrrUrUos�������DrrUN)r�textwrapr�typingrr�typedefsr�__all__� Exceptionrr$r.r0r3r5r7r9rArKrRrUr"rr�<module>r[sc��(�(�������"�"�"�"�"�"�"�"�"�"�"�"�"�"� "��U�U�U�U�U�)�U�U�U�D�����(���������^���� (�(�(�(�(�>�(�(�(�"�"�"�"�"�/�"�"�"�#�#�#�#�#�0�#�#�#�=�=�=�=�=�-�=�=�=�/�/�/�/�/�.�/�/�/������N���������N����T�T�T�T�T�M�T�T�T� � � � � �n� � � � � r
Memory