| Server IP : 162.19.112.25 / Your IP : 216.73.216.88 Web Server : LiteSpeed System : Linux qamar.tasjeel.ae 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64 User : archiart ( 1428) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python312/lib64/python3.12/http/__pycache__/ |
Upload File : |
�
��+G\��� �j � d Z ddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Zddlm
Z
g d�ZdZdZdZdZd Zd
Z e� j- ej. j0 � ej. j0 j3 � D � ci c] } | | j4 �� c} ZdZdZdZd
Z ej@ d� jB Z" ej@ d� jF Z$ ej@ d� Z% ej@ d� Z&h d�Z'd?d�Z(de)de)fd�Z* G d� dejV jX � Z-d� Z.e-fd�Z/e-fd�Z0 G d� dejb � Z2d� Z3 G d� d � Z4 ddl5Z5 G d!� d"e4� Z6ejo d"� G d#� d$e9� Z: G d%� d&e:� Z; G d'� d(e:� Z< G d)� d*e:� Z= G d+� d,e:� Z> G d-� d.e:� Z? G d/� d0e:� Z@ G d1� d2e:� ZA G d3� d4eA� ZB G d5� d6eA� ZC G d7� d8eA� ZD G d9� d:e:� ZE G d;� d<e:� ZF G d=� d>eGeE� ZHe:ZIyc c} w # e8$ r Y ��w xY w)@a�
HTTP/1.1 client library
<intro stuff goes here>
<other stuff, too>
HTTPConnection goes through a number of "states", which define when a client
may legally make another request or fetch the response for a particular
request. This diagram details these state transitions:
(null)
|
| HTTPConnection()
v
Idle
|
| putrequest()
v
Request-started
|
| ( putheader() )* endheaders()
v
Request-sent
|\_____________________________
| | getresponse() raises
| response = getresponse() | ConnectionError
v v
Unread-response Idle
[Response-headers-read]
|\____________________
| |
| response.read() | putrequest()
v v
Idle Req-started-unread-response
______/|
/ |
response.read() | | ( putheader() )* endheaders()
v v
Request-started Req-sent-unread-response
|
| response.read()
v
Request-sent
This diagram presents the following rules:
-- a second request may not be started until {response-headers-read}
-- a response [object] cannot be retrieved until {request-sent}
-- there is no differentiation between an unread response body and a
partially read response body
Note: this enforcement is applied by the HTTPConnection class. The
HTTPResponse class does not enforce this state machine, which
implies sophisticated clients may accelerate the request/response
pipeline. Caution should be taken, though: accelerating the states
beyond the above pattern may imply knowledge of the server's
connection-close behavior for certain requests. For example, it
is impossible to tell whether the server will close the connection
UNTIL the response headers have been read; this means that further
requests cannot be placed into the pipeline until it is known that
the server will NOT be closing the connection.
Logical State __state __response
------------- ------- ----------
Idle _CS_IDLE None
Request-started _CS_REQ_STARTED None
Request-sent _CS_REQ_SENT None
Unread-response _CS_IDLE <response_class>
Req-started-unread-response _CS_REQ_STARTED <response_class>
Req-sent-unread-response _CS_REQ_SENT <response_class>
� N)�urlsplit)�HTTPResponse�HTTPConnection�
HTTPException�NotConnected�UnknownProtocol�UnknownTransferEncoding�UnimplementedFileMode�IncompleteRead�
InvalidURL�ImproperConnectionState�CannotSendRequest�CannotSendHeader�ResponseNotReady�
BadStatusLine�LineTooLong�RemoteDisconnected�error� responses�P i� �UNKNOWN�IdlezRequest-startedzRequest-senti �d i s [^:\s][^:\r\n]*s \n(?![ \t])|\r(?![ \t\n])z[ - ]z[ -]> �PUT�POST�PATCHc
� � | j d� S # t $ rl}t |j |j |j |j
|j
� �d| |j |j
d�d|�d�� d�d}~ww xY w)z<Call data.encode("latin-1") but show a better error message.�latin-1z (z.20z) is not valid Latin-1. Use z9.encode('utf-8') if you want to send it encoded in UTF-8.N)�encode�UnicodeEncodeError�encoding�object�start�end�title)�data�name�errs �2/opt/alt/python312/lib64/python3.12/http/client.py�_encoder* � s} � �
E��{�{�9�%�%��� E� ��L�L��J�J��I�I��G�G� �Z�Z�\�4�� � �#�'�'�2�D�
:�;� AE� E��E�s � � B�A'B�B�enc_name�returnc �>