� ���g. ��R�ddlmZddlmZddlmZmZddlm Z dd �Z dd�Z dd�Z dS)�)� annotationsN)�!MultipartInvariantViolationDefect�StartBoundaryNotFoundDefect�)�HeaderParsingError�obj�object�return�boolc��� |���S#t$rYnwxYw |jS#t$rYnwxYw |jduS#t$rYnwxYwt d���)zt Checks whether a given file-like object is closed. :param obj: The file-like object to check. Nz)Unable to determine whether fp is closed.)�isclosed�AttributeError�closed�fp� ValueError)rs �e/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/urllib3/util/response.py� is_fp_closedr s��� ��|�|�~�~��� � � � � �� ���� ��z��� � � � � �� ���� ��v��~��� � � � � �� ���� �@� A� A�As)�� #�#�.� ;�;�A� A�A�headers�httplib.HTTPMessage�Nonec�V�t|tj��s tdt |���d����d}|���s2|���}t|ttf��r|}d�|j D��}|s|rt||����dS)a> Asserts whether all headers have been successfully parsed. Extracts encountered errors from the result of parsing headers. Only works on Python 3. :param http.client.HTTPMessage headers: Headers to verify. :raises urllib3.exceptions.HeaderParsingError: If parsing errors are found. zexpected httplib.Message, got �.Nc�J�g|] }t|ttf���|��!S�)� isinstancerr)�.0�defects r� <listcomp>z)assert_header_parsing.<locals>.<listcomp>OsD����� �� �0�2S�T� � ������)�defects� unparsed_data) r�httplib� HTTPMessage� TypeError�type� is_multipart� get_payload�bytes�strr r)rr!�payloadr s r�assert_header_parsingr+(s��� �g�w�2� 3� 3�K��I��g���I�I�I�J�J�J��M� � � � !� !�$��%�%�'�'�� �g��s�|� ,� ,� $�#�M����o����G��O�-�O� �� �N�N�N�N�O�Or�response�httplib.HTTPResponsec�@�|j}|���dkS)z� Checks whether the request of a response has been a HEAD-request. :param http.client.HTTPResponse response: Response to check if the originating request used 'HEAD' as a method. �HEAD)�_method�upper)r,� method_strs r�is_response_to_headr3[s#���!�J� � � � � �� '�'r)rr r r )rrr r)r,r-r r ) � __future__r� http.client�clientr"� email.errorsrr� exceptionsrrr+r3rrr�<module>r9s���"�"�"�"�"�"�������W�W�W�W�W�W�W�W�+�+�+�+�+�+�B�B�B�B�>0O�0O�0O�0O�f (� (� (� (� (� (r
Memory