| Server IP : 88.99.149.37 / Your IP : 216.73.216.141 Web Server : nginx/1.31.2 System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64 User : muralimurth ( 1015) PHP Version : 8.4.23 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3.12/site-packages/urllib3/util/__pycache__/ |
Upload File : |
�
�nj�
� �J � d dl mZ d dlmZmZ ddlmZ ddlmZ d� Z
d� Zd� Zy )
� )�absolute_import)�!MultipartInvariantViolationDefect�StartBoundaryNotFoundDefect� )�HeaderParsingError)�http_clientc �� � | j � S # t $ r Y nw xY w | j S # t $ r Y nw xY w | j du S # t $ r
Y t d� �w xY w)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)�objs �:/usr/lib/python3.12/site-packages/urllib3/util/response.py�is_fp_closedr s{ � �
� �|�|�~����
��
��
��z�z����
��
��
� �v�v��~����
��
�@�
A�A�
�s) � � ��. � :�:�
A � A"�!A"c � � t | t j � s#t dj t | � � � �t
| dd� }t
| dd� }d}|r/| j � s |� }t |t t f� r|}|r%|D �cg c] }t |t t f� s|�� }}|s|r
t ||�� �yc c}w )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.
z"expected httplib.Message, got {0}.�defectsN�get_payload)r �
unparsed_data)
�
isinstance�httplib�HTTPMessage� TypeError�format�type�getattr�is_multipart�bytes�strr r r )�headersr r r �payload�defects r �assert_header_parsingr# ( s� � � �g�w�2�2�3��<�C�C�D��M�R�S�S��g�y�$�/�G��'�=�$�7�K��M�� �#�#�%�!�m�G��'�E�3�<�0� '�
�� "�
�!����4�6W�X��
�!� �
� �-� ��
�N�N� ��
s �Cc �j � | j }t |t � r|dk( S |j � dk( S )z�
Checks whether the request of a response has been a HEAD-request.
Handles the quirks of AppEngine.
:param http.client.HTTPResponse response:
Response to check if the originating request
used 'HEAD' as a method.
� �HEAD)�_methodr �int�upper)�response�methods r �is_response_to_headr, ^ s4 � � �
�
�F��&�#����{���<�<�>�V�#�#� N)
�
__future__r �email.errorsr r �
exceptionsr �packages.six.movesr r r r# r, � r- r �<module>r3 s# �� &� W� +� 7�B�>3O�l
$r-