Files
witness-fracture/.venv/lib/python3.12/site-packages/urllib3/__pycache__/response.cpython-312.pyc
T

331 lines
51 KiB
Plaintext
Raw Normal View History

2025-06-23 17:55:02 -05:00
Ë
o»Yh�µã
ó¶—ddlmZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddl Z ddl Z ddl
mZddlmZddlmZddlmZe
j,rddlmZ ddlZdd lmZdd
lmZdd lm Z dd l!m"Z"m#Z#m$Z$dd
l%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/ddl0m1Z1m2Z2ddl3m4Z4e
j,rddl5m6Z6ejne8«Z9Gd„d«Z:Gd„de:«Z;Gd„d«Z<Gd„de:«Z=e� Gd„de:«Z> ddl?m@Z@dZAGd„de:«ZBGd$„d%e:«ZMd-d&„ZNGd'„d(«ZOGd)„d*ej «ZQGd+„d,eQ«Zy#e$rddlZYŒöwxYw#e$rdZY�ŒwxYw#e$rl ddlCZ@eDeEeFejŽde@j�«j“«««ZJeJd kred!«‚ dZAGd"„de:«ZBn#eKeeLf$rd#ZAYnwxYwYŒÇwxYw).é)Ú annotationsN)Úcontextmanager)Ú HTTPMessage)Ú HTTPResponse)Útimeouté)ÚBaseHTTPConnection)Úutil)Ú
_TYPE_BODY)ÚHTTPHeaderDict)Ú BaseSSLErrorÚHTTPConnectionÚ
HTTPException)
ÚBodyNotHttplibCompatibleÚ DecodeErrorÚ HTTPErrorÚIncompleteReadÚInvalidChunkLengthÚ
InvalidHeaderÚ
ProtocolErrorÚReadTimeoutErrorÚResponseNotChunkedÚSSLError)Ú is_fp_closedÚis_response_to_head)ÚRetry)ÚHTTPConnectionPoolcó—eZdZdd„Zdd„Zy)ÚContentDecodercó—t«‚©N©ÚNotImplementedError©ÚselfÚdatas úY/mnt/c/fieldcraft/witness-fracture/.venv/lib/python3.12/site-packages/urllib3/response.pyÚ
decompresszContentDecoder.decompress7ó €Ü!Ó#Ð#ócó—t«‚r!r"©r%s r'ÚflushzContentDecoder.flush:r)r*N©r&ÚbytesÚreturnr/©r0r/)Ú__name__Ú
__module__Ú __qualname__r(r-©r*r'rr6s „ó$ô$r*rcó$—eZdZdd„Zdd„Zdd„Zy)ÚDeflateDecodercóR—d|_d|_tj«|_y)NTr*)Ú
_first_tryÚ_dataÚzlibÚ
decompressobjÚ_objr,s r'Ú__init__zDeflateDecoder.__init__?s €ØˆŒØˆŒ
Ü×&Ñ&Ó(ˆ� r*cóΗ|s|S|js|jj|«S|xj|z
c_ |jj|«}|rd|_d|_|S#tj
$rbd|_t j tj «|_ |j|j«d|_cYS#d|_wxYwwxYw)NF)r9r=r(r:r;Úerrorr<Ú MAX_WBITS)r%r&Ú decompresseds r'r(zDeflateDecoder.decompressDsº€Ù؈Kà�ŠØ—9‘9×'Ñ'¨Ó-Ð -à �
Š
�d�
ð "ØŸ9™9×/Ñ/°Ó5ˆLÙØ"'�”Ø!�”
ØÐ øÜ�z‰zò "Ø#ˆDŒOÜ×*Ñ*¬D¯N©N¨?Ó;ˆDŒIð
"Ø—‘ t§z¡zÓ2à!�—
ø˜T�•
úð
 "ús%Á,A/Á/AC$Â3CÃ
C$à C à C$có6—|jj«Sr!©r=r-r,s r'r-zDeflateDecoder.flushZó€Ø�y‰y�‰Ó Ð r*N©r0ÚNoner.r1©r2r3r4r>r(r-r5r*r'r7r7>s„ó)ó
"ô,!r*r7có—eZdZdZdZdZy)ÚGzipDecoderStaterréN)r2r3r4Ú FIRST_MEMBERÚ
OTHER_MEMBERSÚ SWALLOW_DATAr5r*r'rJrJ^s„Ø€LØ€MØ�Lr*rJcó$—eZdZdd„Zdd„Zdd„Zy)Ú GzipDecodercó„—tjdtjz«|_tj
|_y©Né)r;r<rAr=rJrLÚ_stater,s r'r>zGzipDecoder.__init__es*€Ü×&Ñ& r¬D¯N©NÑ':Ó;ˆŒ Ü&×3Ñ3ˆ� r*có$—t«}|jtjk(s|s t |«S ||j
j
|«z
}|j
j}|s t |«Stj|_tjdtjz«|_Œƒ#tj$rC|j}tj|_|tjk(r
t |«cYS‚wxYwrR)
Ú bytearrayrTrJrNr/r=r(r;r@rMÚ unused_datar<rA)r%r&ÚretÚprevious_states r'r(zGzipDecoder.decompressisۀ܋kˆØ �;‰;Ô*×7Ñ7Ò 7¹tܘ“:Ð Øð
Ø�t—y‘y×+Ñ+¨DÓ1Ñ1�ð—9‘9×(Ñ(ˆDÙܘS“zÐ!Ü*×8Ñ8ˆDŒKÜ×*Ñ*¨2´·±Ñ+>Ó?ˆDŒIðøô—:‘:ò
Ø!%§¡�ä.×;Ñ;�” Ø!Ô%5×%CÑ%CÒCä  ›:Ò%Øð
ús·B9Â9ADÄ
Dcó6—|jj«Sr!rDr,s r'r-zGzipDecoder.flush~rEr*NrFr.r1rHr5r*r'rPrPds„ó4ó@ô*!r*rPcó—eZdZdd„Zdd„Zy)Ú
BrotliDecodercóè—tj«|_t|jd«r"t |d|jj
«yt |d|jj «y)Nr()ÚbrotliÚ Decompressorr=ÚhasattrÚsetattrr(Úprocessr,s r'r>zBrotliDecoder.__init__ˆsL€Ü×+Ñ+Ó-ˆDŒIÜ�t—y‘y ,Ô/ܘ˜l¨D¯I©I×,@Ñ,@ÕA䘘l¨D¯I©I×,=Ñ,=Õ>r*cód—t|jd«r|jj«Sy)Nr-r*)r`r=r-r,s r'r-zBrotliDecoder.flush�s$€Ü�t—y‘y 'Ô*Ø—y‘y—‘Ó(Ð(Ør*NrFr1)r2r3r4r>r-r5r*r'r\r\„s „ó ?ô r*r\)ÚzstdTcó$—eZdZdd„Zdd„Zdd„Zy)Ú ZstdDecodercó6—tj«|_yr!)rdÚZstdDecompressorr=r,s r'r>zZstdDecoder.__init__œs€Ü×-Ñ-Ó/ˆD�Ir*cóÆ—|sy|jj|«g}|jjrœ|jjr†|jj}t j
«|_|j
|jj|««|jjr|jjrŒ†dj|«S©Nr*)r=r(ÚeofrWrdrhÚappendÚjoin©r%r&Ú
data_partsrWs r'r(zZstdDecoder.decompressŸsœ€ÙØØŸ)™)×.Ñ.¨tÓ4Ð5ˆJØ—)‘)—-’- D§I¡I×$9Ò$9Ø"Ÿi™i×3Ñ3� Ü ×1Ñ1Ó3�” Ø×!Ñ! $§)¡)×"6Ñ"6°{Ó"CÔDð—)‘)—-’- D§I¡I×$9Ó$9ð—8‘8˜JÓ'Ð 'r*cóF—|jjs td«‚y)NúZstandard data is incompleter*)r=rkrr,s r'r-zZstdDecoder.flush©s€Ø—9‘9—=’=Ü!Ð"@ÓAÐAØr*NrFr.r1rHr5r*r'rfrf›s„ó 0ó (ô r*rfz^([0-9]+)\.([0-9]+))réz!zstandard module doesn't have eofcó$—eZdZdd„Zdd„Zdd„Zy)rfcóR—tj«j«|_yr!)rdrhr<r=r,s r'r>zZstdDecoder.__init__Âs€Ü ×1Ñ1Ó3×AÑAÓC�• r*cóâ—|sy|jj|«g}|jjrª|jjr”|jj}t j
«j
«|_|j|jj|««|jjr|jjrŒ”dj|«Srj) r=r(rkrWrdrhr<rlrmrns r'r(zZstdDecoder.decompressÅs¥€ÙØØ"Ÿi™i×2Ñ2°4Ó8Ð9�
Ø—i‘i—m’m¨¯ © ×(=Ò(=Ø"&§)¡)×"7Ñ"7�KÜ $× 5Ñ 5Ó 7× EÑ EÓ G�D”IØ×%Ñ% d§i¡i×&:Ñ&:¸;Ó&GÔHð—i‘i—m’m¨¯ © ×(=Ó(=ð—x‘x 
Ó+Ð+r*có|—|jj«}|jjs td«‚|S)Nrq)r=r-rkr)r%rXs r'r-zZstdDecoder.flushÏs.€Ø—i‘i—o‘oÓ'�Ø—y‘y—}’}Ü%Ð&DÓEÐEØ�
r*NrFr.r1rHr5r*r'rfrfÁs„ó
Dó
,ô
r*Fcó(—eZdZdZdd„Zdd„Zdd„Zy) Ú MultiDecodera
From RFC7231:
If one or more encodings have been applied to a representation, the
sender that applied the encodings MUST generate a Content-Encoding
header field that lists the content codings in the order in which
they were applied.
có„—|jd«D�cgc]}t|j««‘Œc}|_ycc}w)Nú,)ÚsplitÚ _get_decoderÚstripÚ _decoders)r%ÚmodesÚms r'r>zMultiDecoder.__init__ßs+€Ø;@¿;¹;ÀsÓ;KÖL°aœ, q§w¡w£yÕ1ÒLˆ�ùÒLs” =có<—|jdj«S©Nr)r~r-r,s r'r-zMultiDecoder.flushâs€Ø�~‰~˜aÑ ×&Ñ&Ó(Ð(r*có\—t|j«D]}|j|«}Œ|Sr!)Úreversedr~r()r%r&Úds r'r(zMultiDecoder.decompressås-€Ü˜$Ÿ.™.Ó)ò &ˆAØ—<‘< Ó%‰Dð &àˆ r*N)rÚstrr0rGr1r.)r2r3r4Ú__doc__r>r-r(r5r*r'rxrxÖs„ñóMó)ôr*rxcó¤—d|vr t|«S|dvr
t«St�|dk(r
t«Str|dk(r
t «St
«S)Nrz)Úgzipúx-gzipÚbrrd)rxrPr^r\ÚHAS_ZSTDrfr7)Úmodes r'r|r|ësU€Ø
ˆd�{ܘDÓ!Ð!ð Ð!Ñ!Ü‹}Ðä
Иd dšlÜ‹Ðå�D˜F’NÜ‹}Ðä Ó Ðr*có8—eZdZdZdd„Zd d„Zd
d„Zd d„Zd d„Zy)
ÚBytesQueueBuffera Memory-efficient bytes buffer
To return decoded data in read() and still follow the BufferedIOBase API, we need a
buffer to always return the correct amount of bytes.
This buffer should be filled using calls to put()
Our maximum memory usage is determined by the sum of the size of:
* self.buffer, which contains the full data
* the largest chunk that we will copy in get()
The worst case scenario is a single chunk, in which case we'll make a full copy of
the data inside get().
cóD—tj«|_d|_yr‚)Ú collectionsÚdequeÚbufferÚ_sizer,s r'r>zBytesQueueBuffer.__init__s€Ü+6×+<Ñ+<Ó+>ˆŒ ؈�
r*có—|jSr!)r”r,s r'Ú__len__zBytesQueueBuffer.__len__s €Ø�z‰zÐr*cóv—|jj|«|xjt|«z
c_yr!)r“rlr”Úlenr$s r'ÚputzBytesQueueBuffer.puts&€Ø � ‰ ×ј4Ô Ø �
Š
”c˜$“iÑŽ
r*cód—|dk(ry|js td«‚|dkr td«‚d}tj«}||krÙ||z
}|jj «}t
|«}||kr\|d|||d}}|j|«|jj|«|xj|zc_ |j«S|j|«|xj|zc_ ||z
}|js |j«S||krŒÙ|j«S)Nrr*zbuffer is emptyzn should be > 0) r“Ú RuntimeErrorÚ
ValueErrorÚioÚBytesIOÚpopleftr˜ÚwriteÚ
appendleftr”Úgetvalue) r%ÚnÚfetchedrXÚ remainingÚchunkÚ chunk_lengthÚ
left_chunkÚ right_chunks r'ÚgetzBytesQueueBuffer.gets€Ø �Š6ØØ—’ÜÐ0Ó1Ð 1Ø
�ŠUÜÐ.Ó/Ð /àˆÜ�j‰j‹lˆØ˜ŠkؘG™ ˆIØ—K‘K×'Ñ'Ó)ˆEܘu›:ˆLؘ<Ò'Ø*/°
°Ð*;¸UÀ9À:Ð=N˜K�
Ø— ‘ ˜*Ô%Ø— ‘ ×&Ñ& {Ô3Ø—
’
˜iÑ'•
Øð�|‰|‹~Ðð— ‘ ˜%Ô Ø—
’
˜lÑ*•
Ø �|Ñ #ˆGà—;’;Øà�|‰|‹~Ðð%˜‹kð$�|‰|‹~Ðr*có4‡—|jЉs|jdk(sJ‚yt‰«dk(r‰j«}nPt j
«}|j
ˆfd„tt‰««D««|j«}d|_|S)Nrr*rc3ó>•K—|]}‰j«–—Œy­wr!)rŸ)Ú.0Ú_r“s €r'ú <genexpr>z+BytesQueueBuffer.get_all.<locals>.<genexpr>@søèø€ÒH°˜6Ÿ>™>×+ÑHùsƒ) r“r”r˜Úpopr�ržÚ
writelinesÚranger¢)r%ÚresultrXr“s @r'Úget_allzBytesQueueBuffer.get_all7svø€Ø—‘ˆÙØ—:‘: ’?Ð "�?ØÜ ˆv‹;˜!Ò Ø—Z‘Z“\‰Fä—*‘*“,ˆCØ �N‰NÓH´U¼3¸v»;Ó5GÔHÔ HØ—\‘\“^ˆF؈Œ
؈
r*NrF©r0Úint)r&r/r0rG)r£r¶r0r/r1) r2r3r4r‡r>r–r™rªr´r5r*r'r�r�ýs „ñó óó óô< r*r�cóX—eZdZUgd¢Ze�edgz
Zeredgz
Zgd¢ZeejfZ
de d<e�e
ejfz
Z
ere
e jfz
Z
dddœ d"d „Zd#d
„Zed$d „«Zd%d „Zed&d
„«Zej(d'd„«Zed(d„«Zed)d„«Zej(d*d„«Z d+ d,d„Z d- d.d„Z d/ d0d„Z d/ d,d„Zd1d„Zd1d„Zd1d„Zd1d„Zd1d„Z d2d„Z d$d„Z!d3d„Z"d4d„Z#d5d6d„Z$d4d „Z%d&d!„Z&y)7ÚBaseHTTPResponse)r‰rŠÚdeflateNr‹rd)i-i.i/i3i4ztuple[type[Exception], ...]ÚDECODER_ERROR_CLASSES)ÚheadersÚretriescó~—t|t«r||_nt|«|_||_||_||_||_||_d|_||_ ||_
d|_ |jjdd«j«} d„| jd«D«}
d|
vrd|_ d|_|y)NFztransfer-encodingÚc3ó<K—|]}|j«–—Œy­wr!)r})r­Úencs r'r¯z,BaseHTTPResponse.__init__.<locals>.<genexpr>qsèø€Ò> S�S—Y‘Y—[Ñ>ùs‚rzÚchunkedT)Ú
isinstancer r»ÚstatusÚversionÚversion_stringÚreasonÚdecode_contentÚ_has_decoded_contentÚ _request_urlr¼rÁrªÚlowerr{Ú_decoder) r%r»rÃrÄrÅrÆrÇÚ request_urlr¼Útr_encÚ encodingss r'r>zBaseHTTPResponse.__init__Us°€ô �gœ~Ô .Ø"ˆD�Lä)¨'Ó2ˆDŒL؈Œ ؈Œ Ø,ˆÔ؈Œ Ø,ˆÔØ$)ˆÔ!Ø(3ˆÔ؈Œ àˆŒ Ø—‘×!Ñ!Ð"5°rÓ:×@Ñ@ÓBˆá>¨F¯L©L¸Ó,=Ô>ˆ Ø ˜ Ñ !؈DŒLà/3ˆŒ
Ú r*cój—|j|jvr|jjd«Sy)a
Should we redirect and where to?
:returns: Truthy redirect location string if we got a redirect status
code and valid location. ``None`` if redirect status and no
location. ``False`` if not a redirect status code.
ÚlocationF)rÃÚREDIRECT_STATUSESr»rªr,s r'Úget_redirect_locationz&BaseHTTPResponse.get_redirect_locationxs.€ð �;‰;˜$×0Ñ0Ñ 0Ø—<‘<×#Ñ# JÓ/Ð /Ør*có—t«‚r!r"r,s r'r&zBaseHTTPResponse.data„ó €ä!Ó#Ð#r*cób—|jjd«}tj|«S)aÄ
Deserializes the body of the HTTP response as a Python object.
The body of the HTTP response must be encoded using UTF-8, as per
`RFC 8529 Section 8.1 <https://www.rfc-editor.org/rfc/rfc8259#section-8.1>`_.
To use a custom JSON decoder pass the result of :attr:`HTTPResponse.data` to
your custom decoder instead.
If the body of the HTTP response is not decodable to UTF-8, a
`UnicodeDecodeError` will be raised. If the body of the HTTP response is not a
valid JSON document, a `json.JSONDecodeError` will be raised.
Read more :ref:`here <json_content>`.
:returns: The body of the HTTP response as a Python object.
zutf-8)r&ÚdecodeÚ_jsonÚloadsr$s r'ÚjsonzBaseHTTPResponse.jsonˆs'€ð$�y‰y×Ñ Ó(ˆÜ�{‰{˜4Ó Ð r*có—t«‚r!r"r,s r'ÚurlzBaseHTTPResponse.url�rÔr*có—t«‚r!r"©r%rÛs r'rÛzBaseHTTPResponse.url¡rÔr*có—t«‚r!r"r,s r'Ú
connectionzBaseHTTPResponse.connection¥rÔr*có—|jSr!)Ú_retriesr,s r'r¼zBaseHTTPResponse.retries©s €à�}‰}Ðr*cój—|�*|jr|jdj|_||_y)Néÿÿÿÿ)ÚhistoryÚredirect_locationrÛrá)r%r¼s r'r¼zBaseHTTPResponse.retries­s-€ð Ð  7§?¢?Ø—‘ rÑ*×<Ñ<ˆDŒH؈�
r*có—t«‚r!r"©r%ÚamtrÇs r'ÚstreamzBaseHTTPResponse.stream´s
€ô"Ó#Ð#r*có—t«‚r!r")r%rèrÇÚ
cache_contents r'ÚreadzBaseHTTPResponse.read¹s
€ô "Ó#Ð#r*có—t«‚r!r"rçs r'Úread1zBaseHTTPResponse.read1Áó
€ô
"Ó#Ð#r*có—t«‚r!r"rçs r'Ú read_chunkedzBaseHTTPResponse.read_chunkedÈrïr*có—t«‚r!r"r,s r'Ú release_connzBaseHTTPResponse.release_connÏr)r*có—t«‚r!r"r,s r'Ú
drain_connzBaseHTTPResponse.drain_connÒr)r*có—t«‚r!r"r,s r'ÚshutdownzBaseHTTPResponse.shutdownÕr)r*có—t«‚r!r"r,s r'ÚclosezBaseHTTPResponse.closeØr)r*cóz—|jjdd«j«}|j€€||jvrt |«|_yd|vr\|j
d«D�cgc].}|j«|jvr|j«‘Œ0}}|rt |«|_yyyycc}w)z=
Set-up the _decoder attribute if necessary.
úcontent-encodingr¾Nrz)r»rªrÊrËÚCONTENT_DECODERSr|r{r})r%Úcontent_encodingÚerÎs r'Ú
_init_decoderzBaseHTTPResponse._init_decoderÛs½€ð  Ÿ<™<×+Ñ+Ð,>ÀÓC×IÑIÓKÐØ �=‰=Ð Ø 4×#8Ñ#8Ñ8Ü ,Ð-=Ó >�•
ØÐ(Ñ(ð.×3Ñ3°CÓ8öàØ—w‘w“y D×$9Ñ$9Ñ9ð—G‘G•Ið� ðñ
Ü$0Ð1AÓ$B�D•Mðð
)ð !ùòsÁ-3B8cóf—|s|jr td«‚|S |jr"|jj|«}d|_|r||j«z
}|S#|j$r?}|j
j
dd«j«}td|z|«|‚d}~wwxYw)zN
Decode the data passed in and potentially flush the decoder.
ú_Calling read(decode_content=False) is not supported after read(decode_content=True) was called.Trûr¾zEReceived response with content-encoding: %s, but failed to decode it.N)
rÈr›rËr(rºr»rªrÊrÚ_flush_decoder)r%r&rÇÚ
flush_decoderrþrýs r'Ú_decodezBaseHTTPResponse._decodeîsÉ€ñ Ø×(Ò(Ü"ð<óððˆKð
Ø�}Š}Ø—}‘}×/Ñ/°Ó5�Ø,0�Ô)ñ Ø �D×'Ñ'Ó)Ñ )ˆDàˆ øð×)Ñ)ò Ø#Ÿ|™|×/Ñ/Ð0BÀBÓG×MÑMÓOÐ Üð'Ø)9ñ:àóðð 
ûð ús�.A"Á"B0Á1:B+Â+B0cóˆ—|jr6|jjd«|jj«zSy)zk
Flushes the decoder. Should only be called if the decoder is actually
being used.
r*)rËr(r-r,s r'rzBaseHTTPResponse._flush_decoder s5€ð
�=Š=Ø—=‘=×+Ñ+¨CÓ0°4·=±=×3FÑ3FÓ3HÑHÐ HØr*có†—|jt|««}t|«dk(ry||dt|«t|«Sr‚)rìr˜)r%ÚbÚtemps r'ÚreadintozBaseHTTPResponse.readintos;€Ø�y‰yœ˜Q›Ó ˆÜ ˆt‹9˜Š>Øà!ˆAˆk”�D“ ˆNÜ�t“9Ð r*cóR—tjdtd¬«|jS)Nz|HTTPResponse.getheaders() is deprecated and will be removed in urllib3 v2.6.0. Instead access HTTPResponse.headers directly.rK©ÚcategoryÚ
stacklevel)ÚwarningsÚwarnÚDeprecationWarningr»r,s r'Ú
getheaderszBaseHTTPResponse.getheaderss&€Ü�
‰
ð
Oä'Øõ 
ð �|‰|Ðr*cór—tjdtd¬«|jj ||«S)Nz‚HTTPResponse.getheader() is deprecated and will be removed in urllib3 v2.6.0. Instead use HTTPResponse.headers.get(name, default).rKr )rrrr»rª)r%ÚnameÚdefaults r'Ú getheaderzBaseHTTPResponse.getheader(s3€Ü�
‰
ð
Vä'Øõ 
ð �|‰|×Ñ  gÓ.Ð.r*có—|jSr!)r»r,s r'ÚinfozBaseHTTPResponse.info2s €Ø�|‰|Ðr*có—|jSr!)rÛr,s r'ÚgeturlzBaseHTTPResponse.geturl5s €Ø�x‰xˆr*)r»ú>typing.Mapping[str, str] | typing.Mapping[bytes, bytes] | NonerÃr¶rÄr¶rÅr†rÆú
str | NonerÇÚboolrÌrr¼ú Retry | Noner0rG)r0z"str | None | typing.Literal[False]r1)r0z
typing.Any©r0r)rÛrr0rG)r0zBaseHTTPConnection | None)r0r)r¼rr0rG©iN)rèú
int | NonerÇú bool | Noner0útyping.Iterator[bytes]©NNF©rèr rÇr!rërr0r/©NN©rèr rÇr!r0r/rF)r&r/rÇr!rrr0r/)rrVr0r¶)r0r r!)rr†rrr0r)'r2r3r4rür^rŒrÑÚIOErrorr;r@rºÚ__annotations__rdÚ ZstdErrorr>rÒÚpropertyr&rÙrÛÚsetterrßr¼rérìrîrñrórõr÷rùrÿrrr rrrrr5r*r'r¸r¸Fsr…Ú4ÐØ
ÐØ˜T˜FÑ"ÐÙØ˜V˜HÑ$ÐÚ1Ðà:AÀ4Ç:Á:Ð9NÐÐ6ÓNØ
ÐØ &§,¡, Ñ0ÐáØ $§.¡.Ð!2Ñ2Ðð
SWð!%ñ!*ðPð!*ðð !*ð
ð !*ð ð
!*ðð!*ðð!*ð ð!*ðð!*ð
ó!*óF
ðò$óð$ó!ð*ò$óð$ð ‡Z�Zò$óð$ðò$óð$ðòóðð
‡^�^ò óð ðFJð$Øð$Ø7Bð$à ó$ðØ&*Ø#ð $à
ð$ð$ð$ðð $ð
ó $ðØ&*ð$à
ð$ð$ð$ð
ó $ðØ&*ð$à
ð$ð$ð$ð
ó $ó$ó$ó$ó$óCð&ØðØ+6ðØGKðà óó<óóô/óôr*r¸có‡—eZdZdZ d d ˆfd„
Zd!d„Zd!d„Zed"d„«Zed#d„«Z d$d„Z
d%d„Z d&d „Z e
d'd
„«Z d(d d œ d)d
„Z d(d d œ d)d„Z d* d+d„Z d, d-d„Z d. d/d„Zd$d„Zd!d„Zd!d„Zed$d„«Zd%d„Zd!d„Zd$d„Zd!d„Zd0d„Z d, d/d„Zed1d„«Zej>d2d„«Zd3d„Z ˆxZ!S)4raá
HTTP Response container.
Backwards-compatible with :class:`http.client.HTTPResponse` but the response ``body`` is
loaded and decoded on-demand when the ``data`` property is accessed. This
class is also compatible with the Python standard library's :mod:`io`
module, and can hence be treated as a readable object in the context of that
framework.
Extra parameters for behaviour not present in :class:`http.client.HTTPResponse`:
:param preload_content:
If True, the response's body will be preloaded during construction.
:param decode_content:
If True, will attempt to decode the body based on the
'content-encoding' header.
:param original_response:
When this HTTPResponse wrapper is generated from an :class:`http.client.HTTPResponse`
object, it's convenient to include the original for debug purposes. It's
otherwise unused.
:param retries:
The retries contains the last :class:`~urllib3.util.retry.Retry` that
was used during the request.
:param enforce_content_length:
Enforce content length checking. Body returned by server must match
value of Content-Length header, if present. Otherwise, raise error.
c
óÊ•—t‰|�||||||||
¬«||_||_d|_d|_| |_d|_| |_|rt|ttf«r||_|
|_ | |_
t|d«r||_||_d|_|j#|«|_t'«|_|r%|js|j+|¬«|_yyy)N)r»rÃrÄrÅrÆrÇrÌr¼rrì©rÇ)Úsuperr>Úenforce_content_lengthÚ
auto_closeÚ_bodyÚ_fpÚ_original_responseÚ_fp_bytes_readÚmsgrÂr†r/Ú_poolÚ _connectionr`Ú_sock_shutdownÚ
chunk_leftÚ _init_lengthÚlength_remainingr�Ú_decoded_bufferrì)r%Úbodyr»rÃrÄrÅrÆÚpreload_contentrÇÚoriginal_responseÚpoolrßr6r¼r0Úrequest_methodrÌr1Ú
sock_shutdownÚ __class__s €r'r>zHTTPResponse.__init__Zsóø€ô* ‰ÑØØØØ)ØØ)Ø#Øð ô
ð'=ˆÔ#Ø$ˆŒàˆŒ
Ø04ˆŒØ"3ˆÔØˆÔØˆŒá ”J˜t¤c¬5 \Ô2؈DŒJàˆŒ
Ø%ˆÔä �4˜Ô ؈DŒHØ+ˆÔð'+ˆŒð!%× 1Ñ 1°.Ó AˆÔô 0Ó1ˆÔñ  4§:¢:ØŸ™°.˜ÓAˆD�Jð$.ˆ?r*cóŽ—|jr |jsy|jj|j«d|_yr!)r7r8Ú _put_connr,s r'rózHTTPResponse.release_connšs4€Ø�zŠz ×!1Ò!1Øà �
‰
×јT×-Ñ-Ô.؈Õr*cód— |j«y#ttttf$rYywxYw)zÏ
Read and discard any remaining HTTP response data in the response connection.
Unread data in the HTTPResponse connection blocks the connection from being released back to the pool.
N)rìrÚOSErrorr
rr,s r'rõzHTTPResponse.drain_conn¡s+€ð  Ø �I‰I�KøÜœ7¤L´-Ð@ò Ù ð ús ‚“/®/cóp—|jr |jS|jr|jd¬«Sy)NT)rë)r2r3rìr,s r'r&zHTTPResponse.data¬s0€ð �:Š:Ø—:‘:Ð à �8Š8Ø—9‘9¨4�9Ó0Ð 0àr*có—|jSr!)r8r,s r'rßzHTTPResponse.connection·s€à×ÑÐr*có,—t|j«Sr!)rr3r,s r'ÚisclosedzHTTPResponse.isclosed»s€Ü˜DŸH™HÓ%Ð%r*có—|jS)zì
Obtain the number of bytes pulled over the wire so far. May differ from
the amount of content returned by :meth:``urllib3.response.HTTPResponse.read``
if bytes are encoded on the wire (e.g, compressed).
)r5r,s r'ÚtellzHTTPResponse.tell¾s€ð ×"Ñ"Ð"r*cóê—|jjd«}|�~|jrtj d«y |j d«D�chc]
}t
|«’Œ}}t|«dkDrtd|z«‚|j«}|dkrd}nd} t
|j«}|dvsd |cxkrd
ksn|d k(rd}|Scc}w#t$rd}YŒBwxYw#t$rd}YŒ=wxYw) zM
Set initial length value for Response content if available.
zcontent-lengthNzÒReceived response with both Content-Length and Transfer-Encoding set. This is expressly forbidden by RFC 7230 sec 3.3.2. Ignoring Content-Length and attempting to process response as Transfer-Encoding: chunked.rzrz8Content-Length contained multiple unmatching values (%s)r)éÌi0édéÈÚHEAD) r»rªrÁÚlogÚwarningr{r¶r˜rr°rœrÃ)r%rBÚcontent_lengthÚvalÚlengthsÚlengthrÃs r'r;zHTTPResponse._init_lengthÆs€ð
&*§\¡\×%5Ñ%5Ð6FÓ%Gˆà Ð %Ø�|Š|ô— ‘ ðôðð
"ð 0>×/CÑ/CÀCÓ/HÖI¨œ3˜s�8ÐI�ÐIÜ�w“< !Ò#Ü'ð1Ø3AñBóðð!Ÿ™›�ð˜A’:Ø!‘FðˆFð ܘŸ™Ó%ˆFð
�ZÑ  3¨&Ô#6°3Ô#6¸.ÈFÒ:R؈Fàˆ
ùò7Jøôò
Ø’ð
ûôò ØŠFð ús6ÁCÁCÁ&.CÂC$ÃCà C!à C!Ã$ C2Ã1C2c#óøK—d} d–—d}|sL|jr|jj«|jr|jj«|jr,|jj«r|j!«yyy#t$r}t|jdd«|‚d}~wt$r6}dt |«vr t |«|‚t|jdd«|‚d}~wt $rL}|j�)|j�|j|j k(rd}nd|›�}t||«|‚d}~wttf$r}td|›�|«|‚d}~wwxYw#|sL|jr|jj«|jr|jj«|jr,|jj«r|j!«wwwxYw­w)zç
Catch low-level python exceptions, instead re-raising urllib3
variants, so that low-level exceptions are not leaked in the
high-level api.
On exit, release the connection back to the pool.
FNzRead timed out.zread operation timed outz!Response may not contain content.zConnection broken: T)Ú
SocketTimeoutrr7r
r†rrÚexpectedÚpartialrrrHr4rùr8rLró)r%Ú
clean_exitrþÚargs r'Ú_error_catcherzHTTPResponse._error_catcherþsÞèø€ðˆ
ð5 $ð
KÛð>ˆJñð×*Ò*Ø×+Ñ+×1Ñ1Ô3ð
×#Ò#Ø×$Ñ$×*Ñ*Ô,ð×&Ò&¨4×+BÑ+B×+KÑ+KÔ+MØ×!Ñ!Õ#ð,NÐ&øôa!ò
Sô' t§z¡z°4Ð9JÓKÐQRÐRûäò
Sà-´S¸³VÑ;ä" 1›+¨1Ð,ä& t§z¡z°4Ð9JÓKÐQRÐRûä!ò
3à—J‘JÐ*ØŸ ™ Ð-ØŸ
™
 q§y¡y jÒ0à=‘Cà/°¨uÐ5�CÜ# C¨Ó+°Ð2ûä!¤7Ð+ò
KÜ#Ð&9¸!¸Ð$?ÀÓCÈÐJûð
Kûñð×*Ò*Ø×+Ñ+×1Ñ1Ô3ð
×#Ò#Ø×$Ñ$×*Ñ*Ô,ð×&Ò&¨4×+BÑ+B×+KÑ+KÔ+MØ×!Ñ!Õ#ð,NÐ&üs_‚G:‡B‹E/�BG: E,ÂB5Â5 E,Ã1C2Ã2 E,Ã>AEÅE,ÅE'Å'E,Å,E/Å/BG7Ç7G:F©rîcóâ—|jsJ‚d}|r||kDs|€ç|jrÛ|j|kDrÌtjstj
dkr©|r|jj
|«Stj«}d}|�|dk7r_|�t||«}||z}n|}|jj|«}|s |j«S|j|«~|€ŒY|dk7rŒ_|j«S|r7|�|jj
|«S|jj
«S|�|jj|«S|jj«S)aX
Read a response with the thought that reading the number of bytes
larger than can fit in a 32-bit int at a time via SSL in some
known cases leads to an overflow error that has to be prevented
if `amt` or `self.length_remaining` indicate that a problem may
happen.
The known cases:
* CPython < 3.9.7 because of a bug
https://github.com/urllib3/urllib3/issues/2513#issuecomment-1152559900.
* urllib3 injected with pyOpenSSL-backed SSL-support.
* CPython < 3.10 only when `amt` does not fit 32-bit int.
iÿÿÿ)éé
ir)
r3r<r
Ú IS_PYOPENSSLÚsysÚ version_inforîr�ržÚminrìr r¢)r%rèrîÚ c_int_maxr“Ú
max_chunk_amtÚ chunk_amtr&s r'Ú_fp_readzHTTPResponse._fp_read@sH€ð&�xŠxˆˆx؈ á
�S˜9’_à� Ø×)Ò)Ø×)Ñ)¨IÒ5ä× Ò ¤C×$4Ñ$4°wÒ$>ÙØ—x‘x—~‘~ iÓ0Ð0Ü—Z‘Z“\ˆFð"ˆMØ�+ ¨¢Ø�?Ü # C¨Ó 7�Iؘ9Ñ$‘Cà -�IØ—x‘x—}‘} YÓ/�ÙØð—?‘?Ó$Ð $ð— ‘ ˜TÔ"Øð‘+ ¨£ð—?‘?Ó$Ð $Ù
Ø*-¨/�4—8‘8—>‘> #Ó&Ð O¸t¿x¹x¿~¹~Ó?OÐ Oð*-¨�4—8‘8—=‘= Ó%Ð M¸d¿h¹h¿m¹m»oÐ Mr*có¤—|j€yt|jdd«}|j«5|s|j||¬«nd}|�h|dk7rc|sa|jj «|j
rv|j �j|j dk7r[t|j|j «‚|r9|dk7r|r|j t|«k(r|jj «ddd«rH|xjt|«z
c_|j �|xj t|«zc_|S#1swYŒUxYw)z7
Reads `amt` of bytes from the socket.
NÚclosedFrar*r)
r3Úgetattrr`rlrùr0r<rr5r˜)r%rèrîÚ fp_closedr&s r'Ú _raw_readzHTTPResponse._raw_readys$€ð �8‰8Ð Øä˜DŸH™H h°Ó6ˆ à
×
Ñ
Ó
"ñ !Ù:C�4—=‘= ¨E�=Ô2ȈD؈ 3¨!¢8±Dð—‘—‘Ô à×/Ò/Ø×-Ñ-Ð9Ø×-Ñ-°Ò2ô)¨×)<Ñ)<¸d×>SÑ>SÓTÐTÙØ˜’¡$¨4×+@Ñ+@ÄCÈÃIÒ+Mð —‘—‘Ô ÷= !ñ@ Ø × Ò ¤3 t£9Ñ ,Õ Ø×$Ñ$Ð0Ø×%Ò%¬¨T«Ñ2Õ%؈ ÷I !ð !ús µB=EÅEcó.—|j«|€ |j}|r|dkrd}n7|�5d}t|j«|k\r|jj |«S|j |«}|duxs
|dk7xr| }|st|j«dk(r|S|€|j
|||«}|r||_|S|s|jr td«‚|S|j
|||«}|jj|«t|j«|kr\|rZ|j |«}|j
|||«}|jj|«t|j«|kr|rŒZ|jj |«}|S)aT
Similar to :meth:`http.client.HTTPResponse.read`, but with two additional
parameters: ``decode_content`` and ``cache_content``.
:param amt: