. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 162.0.212.4 / Your IP :
216.73.216.221 [
Web Server : LiteSpeed System : Linux premium146.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : alshnoli ( 2431) PHP Version : 8.3.28 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/hc_python/lib/python3.12/site-packages/urllib3/util/__pycache__/ |
Upload File : |
�
���g.
� �P � d dl mZ d dlmZ d dlmZmZ ddlm Z d d�Z
d
d�Zdd�Zy)� )�annotationsN)�!MultipartInvariantViolationDefect�StartBoundaryNotFoundDefect� )�HeaderParsingErrorc �� � | 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 �D/opt/hc_python/lib/python3.12/site-packages/urllib3/util/response.py�is_fp_closedr s{ � �
� �|�|�~����
��
��
��z�z����
��
��
� �v�v��~����
��
�@�
A�A�
�s) � � ��. � :�:�
A � A"�!A"c �f � t | t j � st dt | � � d�� �d}| j � s(| j
� }t |t t f� r|}| j 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.
zexpected httplib.Message, got �.N)�defects�
unparsed_data)
�
isinstance�httplib�HTTPMessage� TypeError�type�is_multipart�get_payload�bytes�strr r r r )�headersr �payload�defectr s r �assert_header_parsingr! ( s� � � �g�w�2�2�3��8��g���q�I�J�J��M� ���!��%�%�'���g��s�|�,�#�M� �o�o��%�F���0�2S�T�
� �%� � � �-� ��
�N�N� ��s �;B.c �@ � | j }|j � dk( S )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)�response�
method_strs r �is_response_to_headr( [ s# � � �!�!�J������'�'� )r �object�return�bool)r zhttplib.HTTPMessager+ �None)r&