403Webshell
Server IP : 104.21.21.239  /  Your IP : 216.73.216.55
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.7
System : Linux ip-172-31-69-123.ec2.internal 6.1.177-224.371.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 27 20:28:29 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/awscli/botocore/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/awscli/botocore/__pycache__/response.cpython-39.pyc
a

wA�i\�@s�ddlZddlZddlmZmZddlmZmZmZddl	m
Z
mZddlm
Z
ddlmZe�e�ZGdd�d�Zd	d
�ZdS)�N)�ScalarTypes�parsers)�
XMLParseError�json�set_socket_timeout)�IncompleteReadError�ReadTimeoutError)�first_non_none_response)rc@sheZdZdZdZdd�Zdd�Zddd	�Zd
d�Zdd
�Z	e	Z
ddd�Zefdd�Zdd�Z
dd�ZdS)�
StreamingBodyaeWrapper class for an http response body.

    This provides a few additional conveniences that do not exist
    in the urllib3 model:

        * Set the timeout on the socket (i.e read() timeouts)
        * Auto validation of content length, if the amount of bytes
          we read does not match the content length, an exception
          is raised.

    �cCs||_||_d|_dS)Nr)�_raw_stream�_content_length�_amount_read)�selfZ
raw_streamZcontent_length�r�</usr/lib/python3.9/site-packages/awscli/botocore/response.py�__init__1szStreamingBody.__init__cCs8zt|j|�Wn"ty2tjddd��Yn0dS)z&Set the timeout seconds on the socket.zbCannot access the socket object of a streaming response.  It's possible the interface has changed.T)�exc_infoN)rr�AttributeError�logger�error)rZtimeoutrrrr6s�z StreamingBody.set_socket_timeoutNc
Csvz|j�|�}Wn2tyB}zt|j|d��WYd}~n
d}~00|jt|�7_|dusj|sr|dkrr|��|S)zhRead at most amt bytes from the stream.

        If the amt argument is omitted, read all data.
        )Zendpoint_urlrNr)r�read�URLLib3ReadTimeoutErrorr�urlr�len�_verify_content_length)rZamt�chunk�errrrPs$zStreamingBody.readcCs|�|j�S)z:Return an iterator to yield 1k chunks from the raw stream.)�iter_chunks�_DEFAULT_CHUNK_SIZE�rrrr�__iter__bszStreamingBody.__iter__cCs|�|j�}|r|St��dS)z-Return the next 1k chunk from the raw stream.N)rr�
StopIteration)r�
current_chunkrrr�__next__fszStreamingBody.__next__Fccsdd}|�|�D]<}||�d�}|dd�D]}|�|�dVq,|d}q|r`|�|�dVdS)z�Return an iterator to yield lines from the raw stream.

        This is achieved by reading chunk of bytes (of size chunk_size) at a
        time from the raw stream, and then yielding lines from there.
        �TN���r)r�
splitlines)r�
chunk_size�keependsZpendingr�lines�linerrr�
iter_linesos
zStreamingBody.iter_linesccs |�|�}|dkrq|VqdS)z\Return an iterator to yield chunks of chunk_size bytes from the raw
        stream.
        r%N)r)rr(r#rrrr~s
zStreamingBody.iter_chunkscCs2|jdur.|jt|j�kr.t|jt|j�d��dS)N)Zactual_bytesZexpected_bytes)r
r�intrr rrrr�s��z$StreamingBody._verify_content_lengthcCs|j��dS)z*Close the underlying http response stream.N)r�closer rrrr.�szStreamingBody.close)N)rF)�__name__�
__module__�__qualname__�__doc__rrrrr!r$�nextr,rrr.rrrrr
"s


r
cCsv|jj}|j|jd�}|ddkr.|j|d<n,|jrPt|j|d�d��|d<n
|j|d<t	�
|�}||�||j�fS)N)�headers�status_coder5i,�bodyr4zcontent-length)
Z
service_modelZresolved_protocolr4r5ZcontentZhas_streaming_outputr
�raw�getrZ
create_parser�parseZoutput_shape)Zoperation_modelZ
http_responseZprotocolZ
response_dict�parserrrr�get_response�s��


�r;)Zlogging�sysZbotocorerrZbotocore.compatrrrZbotocore.exceptionsrrZbotocore.hooksr	Zurllib3.exceptionsrZ	getLoggerr/rr
r;rrrr�<module>s
w

Youez - 2016 - github.com/yon3zu
LinuXploit