HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/urllib3/util/__pycache__/response.cpython-310.pyc
o

�h.
�@sVddlmZddlmZddlmZmZddlm	Z	dd
d�Z
ddd�Zddd�ZdS)�)�annotationsN)�!MultipartInvariantViolationDefect�StartBoundaryNotFoundDefect�)�HeaderParsingError�obj�object�return�boolcCs`z|��WStyYnwz|jWStyYnwz|jduWSty/Ytd��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)r�r�H/usr/local/CyberCP/lib/python3.10/site-packages/urllib3/util/response.py�is_fp_closed	s 
���r�headers�httplib.HTTPMessage�NonecCsnt|tj�stdt|��d���d}|��s#|��}t|ttf�r#|}dd�|j	D�}|s/|r5t
||d��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 �.NcSsg|]}t|ttf�s|�qSr)�
isinstancerr)�.0�defectrrr�
<listcomp>Os���z)assert_header_parsing.<locals>.<listcomp>)�defects�
unparsed_data)r�httplib�HTTPMessage�	TypeError�type�is_multipart�get_payload�bytes�strrr)rr�payloadrrrr�assert_header_parsing(s
��r&�response�httplib.HTTPResponsecCs|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_strrrr�is_response_to_head[s	r-)rrr	r
)rrr	r)r'r(r	r
)
�
__future__r�http.client�clientr�email.errorsrr�
exceptionsrrr&r-rrrr�<module>s

3