§
{<ˆjò¹ ã
ó — d Z ddlmZmZmZmZ ddlmZmZm Z m
Z
ddlmZ ddl
mZ ddl
mZ ddlmZ ddlZddlZddlZdd lmZ ddlZdd
lmZ erddlmZ nddlmZ g d¢Zd
Z dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2d Z3d!Z4d"Z5d#Z6d$Z7d%Z8d&Z9d'Z:d(Z;d)Zd,Z?d-Z@d.ZAd/ZBd0ZCd1ZDd2ZEd3ZFd4ZGd5ZHd6ZId7ZJd8ZKd9ZLd:ZMd;ZNdZQd?ZRd@ZSdAZTdBZUdCZVdDZWdEZXdFZYdGZZi ddH“ddI“ddJ“ddK“ddL“ddM“ddN“ddO“ddP“ddQ“d dR“d!dS“d"dT“d#dU“d$dV“dWdX“d%dY“i d&dZ“d'd[“d(d\“d)d]“d*d^“d+d_“d,d`“d-da“d.db“d/dc“d0dd“d1de“d2df“d3dg“d4dh“d5di“d6dj“¥dkdldmdndodpdqdrdsdtdudvœ¥Z[dwZ\dxZ]dZ^ G dy„ dzej_ ¦ « Z`e`fd{„Za eb¦ « Zc G d|„ d}ejd ¦ « Ze G d~„ deb¦ « Zf ddlgZgdd€lgmhZh G d�„ d‚ef¦ « Zie j d‚¦ « n# ek$ r Y nw xY w G dƒ„ d„el¦ « Zm G d…„ d†em¦ « Zn G d‡„ dˆem¦ « Zo G d‰„ dŠem¦ « Zp G d‹„ dŒem¦ « Zq G d�„ dŽem¦ « Zr G d�„ d�em¦ « Zs G d‘„ d’em¦ « Zt G d“„ d”et¦ « Zu G d•„ d–et¦ « Zv G d—„ d˜et¦ « Zw G d™„ dšem¦ « Zx G d›„ dœem¦ « ZyemZzdS )�aD
HTTP/1.1 client library
A backport of the Python 3.3 http/client.py module for python-future.
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
|
| response = getresponse()
v
Unread-response [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
é )Úabsolute_importÚdivisionÚprint_functionÚunicode_literals)ÚbytesÚintÚstrÚsuper)ÚPY2)Úparser)Úmessage)Úcreate_connectionN)Úurlsplit)Úarray)ÚIterable)ÚHTTPResponseÚHTTPConnectionÚ
HTTPExceptionÚNotConnectedÚUnknownProtocolÚUnknownTransferEncodingÚUnimplementedFileModeÚIncompleteReadÚ
InvalidURLÚImproperConnectionStateÚCannotSendRequestÚCannotSendHeaderÚResponseNotReadyÚ
BadStatusLineÚerrorÚ responseséP i» ÚUNKNOWNÚIdlezRequest-startedzRequest-sentéd ée éf éÈ éÉ éÊ éË éÌ éÍ éÎ éÏ éâ i, i- i. i/ i0 i1 i3 i� i‘ i’ i“ i” i• i– i— i˜ i™ iš i› iœ i� iž iŸ i é¡ i¦ i§ i¨ iª é¬ é é¯ éô éõ éö é÷ éø éù iû iþ éÿ ÚContinuezSwitching ProtocolsÚOKÚCreatedÚAcceptedzNon-Authoritative Informationz
No Contentz
Reset ContentzPartial ContentzMultiple ChoiceszMoved PermanentlyÚFoundz See OtherzNot Modifiedz Use Proxyi2 z(Unused)zTemporary RedirectzBad RequestÚUnauthorizedzPayment RequiredÚ Forbiddenz Not FoundzMethod Not AllowedzNot AcceptablezProxy Authentication RequiredzRequest TimeoutÚConflictÚGonezLength RequiredzPrecondition FailedzRequest Entity Too LargezRequest-URI Too LongzUnsupported Media TypezRequested Range Not SatisfiablezExpectation FailedzPrecondition RequiredzToo Many RequestszRequest Header Fields Too LargezInternal Server ErrorzNot ImplementedzBad GatewayzService UnavailablezGateway TimeoutzHTTP Version Not SupportedzNetwork Authentication Required)r1 r2 r3 r4 r5 r6 r7 r8 r9 r: r; i i c ó — e Zd Zd„ ZdS )ÚHTTPMessagec ó8 — | ¦ « dz }t |¦ « }g }d}| ¦ « D ]Z}|d|… ¦ « |k rd}n|dd… ¦ « sd}|r| |¦ « Œ[|S )aº Find all header lines matching a given header name.
Look through the list of headers and find all lines matching a given
header name (and their continuation lines). A list of the lines is
returned, without interpretation. If the header does not occur, an
empty list is returned. If the header occurs multiple times, all
occurrences are returned. Case is not important in the header name.
ú:r Né )ÚlowerÚlenÚkeysÚisspaceÚappend)ÚselfÚnameÚnÚlstÚhitÚlines ún/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/future/backports/http/client.pyÚgetallmatchingheadersz!HTTPMessage.getallmatchingheadersð s§ € ð �zŠz‰|Œ|˜cÑ!ˆÝ�‰IŒIˆØˆØˆØ—I’I‘K”Kð !ð !ˆDØ�B�Q�BŒx�~Š~ÑÔ 4Ò'Ð'Ø��ؘ"˜1˜"”X×%Ò%Ñ'Ô'ð
Ø�Øð
!Ø—
’
˜4Ñ Ô Ð øØˆ
ó N)Ú__name__Ú
__module__Ú__qualname__rV © rW rU rF rF é s# € € € € € ðð ð ð ð rW rF c óÞ — g } | t dz ¦ « }t |¦ « t k rt d¦ « ‚| |¦ « t |¦ « t
k rt
dt
z ¦ « ‚|dv rnŒŽt d¦ « |¦ « d¦ « }t j |¬¦ « |¦ « S ) aG Parses only RFC2822 headers from a file pointer.
email Parser wants to see strings rather than bytes.
But a TextIOWrapper around self.rfile would buffer too many bytes
from the stream, bytes which we later need to read as bytes.
So we read the correct bytes here, as bytes, for email Parser
to parse.
TrI úheader linezgot more than %d headers©ó
ó
rW rW ú
iso-8859-1)Ú_class)
ÚreadlineÚ_MAXLINErK ÚLineTooLongrN Ú_MAXHEADERSr r ÚjoinÚdecodeÚemail_parserÚParserÚparsestr)Úfprb ÚheadersrT Úhstrings rU Ú
parse_headersro sÖ € ð €GðØ�{Š{�8 a™<Ñ(Ô(ˆÝˆt‰9Œ9•xÒÐݘmÑ,Ô,Ð,Ø�Š�tÑÔÐ݈w‰<Œ<�+Ò%Ð%ÝÐ :½[Ñ HÑIÔIÐIØÐ(Ð(Ð(Øðõ �C‰jŒj�oŠo˜gÑ&Ô&×-Ò-¨lÑ;Ô;€GÝÔ fÐ-Ñ-Ô-×6Ò6°wÑ?Ô?Ð?rW c ó¾ ‡ — e Zd Zdeddfd„Zd„ Zd„ Zd„ Zd„ Zˆ fd„Z ˆ fd „Z
d
„ Zd„ Zdˆ fd„ Z
d
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zdd„Zd„ Zd„ Zd„ Zd„ Zd„ Zˆ xZS )r r Nc ób — | d¦ « | _ || _ |t urt j dt d¦ « || _ d x| _ | _ t | _ t | _ t | _
t | _ t | _ t | _ t | _ d S )NÚrbúithe 'strict' argument isn't supported anymore; http.client now always assumes HTTP/1.x compliant servers.é )Úmakefilerl Ú
debuglevelÚ_strict_sentinelÚwarningsÚwarnÚDeprecationWarningÚ_methodrm ÚmsgÚ_UNKNOWNÚversionÚstatusÚreasonÚchunkedÚ
chunk_leftÚlengthÚ
will_close)rO Úsockrv ÚstrictÚmethodÚurls rU Ú__init__zHTTPResponse.__init__* s™ € ð —-’- Ñ%Ô%ˆŒØ$ˆŒØÕ)Ð)Ð)ÝŒMð Må" Añ
'ô
'ð
'𠈌ð #'Ð&ˆŒ�t”xõ ˆŒÝˆŒÝˆŒåˆŒÝ"ˆŒÝˆŒÝ"ˆŒˆˆrW c óä — t | j t dz ¦ « d¦ « }t |¦ « t k rt d¦ « ‚| j dk rt dt |¦ « ¦ « |st |¦ « ‚ |
d d¦ « \ }}}n?# t $ r2 |
d d¦ « \ }}d}n# t $ r d}Y nw xY wY nw xY w| d¦ « s#|
¦ « t |¦ « ‚ t |¦ « }|d k s|d
k rt |¦ « ‚n# t $ r t |¦ « ‚w xY w|||fS )NrI ra zstatus liner zreply:rt Ú zHTTP/r% iç )r rl rc rd rK re rv ÚprintÚreprr ÚsplitÚ
ValueErrorÚ
startswithÚ_close_connr )rO rT r~ r r€ s rU Ú_read_statuszHTTPResponse._read_statusL s¦ € Ý�4”7×#Ò#¥H¨q¡LÑ1Ô1°<Ñ@Ô@ˆÝˆt‰9Œ9•xÒÐݘmÑ,Ô,Ð,ØŒ?˜QÒÐÝ�(�D ™JœJÑ'Ô'Ð'Øð &õ Ñ%Ô%Ð%ð Ø&*§j¢j°°qÑ&9Ô&9Ñ#ˆG�V˜V˜VøÝð ð ð ð
Ø"&§*¢*¨T°1Ñ"5Ô"5‘�˜Ø��øÝð
ð
ð
à���ð
øøøøøð øøøð ×!Ò! 'Ñ*Ô*ð &Ø×ÒÑÔÐÝ Ñ%Ô%Ð%ð &ݘ‘[”[ˆFؘŠ|ˆ|˜v¨š|˜|Ý# DÑ)Ô)Ð)ð ,øåð &ð