/opt/alt/python-internal/lib64/python3.11/http/__pycache__
Edit: /opt/alt/python-internal/lib64/python3.11/http/__pycache__/client.cpython-311.pyc (61232B)
§
×\œJx0žã óN — d Z ddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Zddlm
Z
g d¢ZdZdZdZdZd Zd
Z e¦ « ej j ¦ « d„ ej j ¦ « D ¦ « ZdZd
Z ej d¦ « j Z ej d¦ « j Z! ej d¦ « Z" ej d¦ « Z#h d£Z$d>d„Z%de&de&fd„Z' G d„ dej( j) ¦ « Z*d„ Z+e*fd„Z, G d„ dej- ¦ « Z. G d„ d¦ « Z/ ddl0Z0 G d „ d!e/¦ « Z1e 2 d!¦ « n# e3$ r Y nw xY w G d"„ d#e4¦ « Z5 G d$„ d%e5¦ « Z6 G d&„ d'e5¦ « Z7 G d(„ d)e5¦ « Z8 G d*„ d+e5¦ « Z9 G d,„ d-e5¦ « Z: G d.„ d/e5¦ « Z; G d0„ d1e5¦ « Z< G d2„ d3e<¦ « Z= G d4„ d5e<¦ « Z> G d6„ d7e<¦ « Z? G d8„ d9e5¦ « Z@ G d:„ d;e5¦ « ZA G d<„ d=eBe@¦ « ZCe5ZDdS )?a¢
HTTP/1.1 client library
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
Req-started-unread-response _CS_REQ_STARTED
Req-sent-unread-response _CS_REQ_SENT
é 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-sentc ó — i | ]
}||j “ŒS © )Úphrase)Ú.0Úvs ú8/opt/alt/python-internal/lib64/python3.11/http/client.pyú
r l s € ÐGÐGÐG˜QˆQ�”ÐGÐGÐGó i éd s [^:\s][^:\r\n]*s \n(?![ \t])|\r(?![ \t\n])z[ - ]z[ -]> ÚPUTÚPOSTÚPATCHÚdatac
óþ — | d¦ « S # t $ r[}t |j |j |j |j | ¦ « ›d| |j |j … d›d|›d�¦ « d‚d}~ww xY w)z