| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/urllib3/util/__pycache__/ |
Upload File : |
a
�?�a�
� @ sP d dl mZ d dlmZmZ ddlmZ ddlmZ dd� Z
dd � Zd
d� ZdS )
� )�absolute_import)�!MultipartInvariantViolationDefect�StartBoundaryNotFoundDefect� )�HeaderParsingError)�http_clientc C sf z
| � � W S ty Y n0 z| jW S ty8 Y n0 z| jd u W S tyX Y n0 td��d S )Nz)Unable to determine whether fp is closed.)Zisclosed�AttributeError�closed�fp�
ValueError)�obj� r
�9/usr/lib/python3.9/site-packages/urllib3/util/response.py�is_fp_closed s
r c C s� t | tj�std�t| ����t| dd �}t| dd �}d }|r^| �� s^|� }t |tt f�r^|}|rpdd� |D �}|sx|r�t
||d��d S )Nz"expected httplib.Message, got {0}.�defects�get_payloadc S s g | ]}t |ttf�s|�qS r
)�
isinstancer r )�.0Zdefectr
r
r �
<listcomp>R s
��z)assert_header_parsing.<locals>.<listcomp>)r �
unparsed_data)r �httplibZHTTPMessage� TypeError�format�type�getattrZis_multipart�bytes�strr )Zheadersr r r Zpayloadr
r
r �assert_header_parsing( s �r c C s$ | j }t|t�r|dkS |�� dkS )N� ZHEAD)�_methodr �int�upper)Zresponse�methodr
r
r �is_response_to_head^ s
r# N)
Z
__future__r Zemail.errorsr r �
exceptionsr Zpackages.six.movesr r r r r# r
r
r
r �<module> s 6