srh ddlmZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl mZddlmZddlmZddlmZe jrddlmZ ddlZn#e$rddlZYnwxYwn #e$rdZYnwxYw ddlZeee ej!d ej"#Z$e$d krd Z%nd Z%n#e&ee'f$rd Z%YnwxYwdd l(m)Z)ddlm*Z*ddl+m,Z,ddl-m.Z.m/Z/m0Z0ddl1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;ddlZ>ddl?m@Z@e jrddlAmBZBejCeDZEGddZFGddeFZGGddZHGddeFZIeGddeFZJe%rGdd eFZKGd!d"eFZLd-d&ZMGd'd(ZNGd)d*ejOZPGd+d,ePZdS).) annotationsN)contextmanager) HTTPMessage) HTTPResponse)timeout)BaseHTTPConnectionz^([0-9]+)\.([0-9]+))rFT)util) _TYPE_BODY)HTTPHeaderDict) BaseSSLErrorHTTPConnection HTTPException) BodyNotHttplibCompatible DecodeError HTTPErrorIncompleteReadInvalidChunkLength InvalidHeader ProtocolErrorReadTimeoutErrorResponseNotChunkedSSLError) is_fp_closedis_response_to_head)Retry)HTTPConnectionPoolceZdZddZddZdS) ContentDecoderdatabytesreturnctNNotImplementedErrorselfr!s \/var/lib/jenkins/jobs/Dev/workspace/my-venv/lib/python3.11/site-packages/urllib3/response.py decompresszContentDecoder.decompressH!###ctr%r&r)s r*flushzContentDecoder.flushKr,r-Nr!r"r#r"r#r")__name__ __module__ __qualname__r+r0r-r*r r Gs<$$$$$$$$$$r-r c&eZdZd dZd dZd dZdS) DeflateDecoderr#NonecRd|_d|_tj|_dS)NTr-) _first_try_datazlib decompressobj_objr/s r*__init__zDeflateDecoder.__init__Ps$ &(( r-r!r"c|s|S|js|j|S|xj|z c_ |j|}|rd|_d|_|S#tj$r\d|_t jtj |_ ||jd|_cYS#d|_wxYwwxYw)NF)r;r?r+r<r=errorr> MAX_WBITS)r)r! decompresseds r*r+zDeflateDecoder.decompressUs K .9''-- - d  "9//55L ""'!  z " " "#DO*DN?;;DI "tz22! T !!!!  "s#+A##:CC7C C  Cc4|jSr%r?r0r/s r*r0zDeflateDecoder.flushky   r-Nr#r9r1r2r3r4r5r@r+r0r6r-r*r8r8OsP)))) """",!!!!!!r-r8ceZdZdZdZdZdS)GzipDecoderStaterrN)r3r4r5 FIRST_MEMBER OTHER_MEMBERS SWALLOW_DATAr6r-r*rKrKosLMLLLr-rKc&eZdZd dZd dZd dZdS) GzipDecoderr#r9cttjdtjz|_tj|_dS)N)r=r>rCr?rKrM_stater/s r*r@zGzipDecoder.__init__vs)&rDN':;; &3 r-r!r"ct}|jtjks|st |S ||j|z }nM#tj$r;|j}tj|_|tj krt |cYSwxYw|jj }|st |Stj |_tj dtj z|_)NTrS) bytearrayrTrKrOr"r?r+r=rBrN unused_datar>rC)r)r!retprevious_states r*r+zGzipDecoder.decompresszskk ;*7 7 7t 7::  @ ty++D111:   !%.; !%5%CCC ::%%% 9(D "Szz!*8DK*2+>??DI @sAABBc4|jSr%rFr/s r*r0zGzipDecoder.flushrGr-NrHr1r2rIr6r-r*rQrQusT4444@@@@*!!!!!!r-rQceZdZddZddZdS) BrotliDecoderr#r9ctj|_t|jdrt |d|jjdSt |d|jjdS)Nr+)brotli Decompressorr?hasattrsetattrr+processr/s r*r@zBrotliDecoder.__init__s`+--DIty,// ?lDI,@AAAAAlDI,=>>>>>r-r"cbt|jdr|jSdS)Nr0r-)r`r?r0r/s r*r0zBrotliDecoder.flushs-ty'** )y(((3r-NrHr2)r3r4r5r@r0r6r-r*r\r\s< ? ? ? ?      r-r\c&eZdZd dZd dZd dZdS) ZstdDecoderr#r9cZtj|_dSr%)zstdZstdDecompressorr>r?r/s r*r@zZstdDecoder.__init__s"-//==??DIIIr-r!r"c|sdS|j|g}|jjr|jjr{|jj}t j|_||j||jjr |jj{d|S)Nr-) r?r+eofrWrgrhr>appendjoin)r)r! data_partsrWs r*r+zZstdDecoder.decompresss s)..t445J)- EDI$9 E"i3  133AACC !!$)"6"6{"C"CDDD)- EDI$9 E88J'' 'r-cn|j}|jjstd|S)NzZstandard data is incomplete)r?r0rjr)r)rXs r*r0zZstdDecoder.flushs4)//##C9= B!"@AAAJr-NrHr1r2rIr6r-r*reresT @ @ @ @ ( ( ( (      r-rec*eZdZdZd dZd dZdd Zd S) 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. modesstrr#r9cNd|dD|_dS)NcPg|]#}t|$Sr6) _get_decoderstrip).0ms r* z)MultiDecoder.__init__..s(LLLa,qwwyy11LLLr-,)split _decoders)r)rqs r*r@zMultiDecoder.__init__s'LL5;;s;K;KLLLr-r"c@|jdSNr)r|r0r/s r*r0zMultiDecoder.flushs~a &&(((r-r!c^t|jD]}||}|Sr%)reversedr|r+)r)r!ds r*r+zMultiDecoder.decompresss3$.)) & &A<<%%DD r-N)rqrrr#r9r2r1)r3r4r5__doc__r@r0r+r6r-r*rprps^MMMM))))r-rpmoderrr#cd|vrt|S|dvrtSt|dkrtStr|dkrt St S)Nrz)gzipx-gzipbrrg)rprQr^r\HAS_ZSTDrer8)rs r*ruruso d{{D!!! !!!}} ddllDFNN}}   r-c:eZdZdZddZddZdd Zdd Zdd Zd S)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(). r#r9cDtj|_d|_dSr~) collectionsdequebuffer_sizer/s r*r@zBytesQueueBuffer.__init__s+6+<+>+>  r-intc|jSr%)rr/s r*__len__zBytesQueueBuffer.__len__s zr-r!r"ct|j||xjt|z c_dSr%)rrkrlenr(s r*putzBytesQueueBuffer.puts2 4    c$ii r-ncD|dkrdS|jstd|dkrtdd}tj}||kr||z }|j}t |}||krT|d|||d}}|||j||xj |zc_ n8|||xj |zc_ ||z }|jsn||k| S)Nrr-zbuffer is emptyzn should be > 0) r RuntimeError ValueErrorioBytesIOpopleftrwrite appendleftrgetvalue) r)rfetchedrX remainingchunk chunk_length left_chunk right_chunks r*getzBytesQueueBuffer.gets6 663 0011 1 UU.// /jllkkG IK''))Eu::L<''*/  *;U9::=NK  *%%% &&{333 i'  %    l* | #G; !kk$||~~r-cZ|js|jdksJdStdkr}nbt j}|fdttD|}d|_|S)Nrr-rc3@K|]}VdSr%)r)rw_rs r* z+BytesQueueBuffer.get_all..'s-HH6>>++HHHHHHr-) rrrpoprr writelinesranger)r)resultrXrs @r*get_allzBytesQueueBuffer.get_alls :????3 v;;!  ZZ\\FF*,,C NNHHHHU3v;;5G5GHHH H H H\\^^F  r-NrHr#r)r!r"r#r9)rrr#r"r2) r3r4r5rr@rrrrr6r-r*rrs     <      r-rceZdZUgdZeedgz Zeredgz ZgdZeej fZ de d<e e ej fz Z er e e j fz Z ddddEdZdFdZedGdZdHdZedId ZejdJd"ZedKd$ZedLd%ZejdMd&Z dNdOd,Z dPdQd/Z dRdSd0Z dRdOd1ZdTd2ZdTd3ZdTd4ZdTd5ZdTd6ZdUd9Z dGd:Z!dVd=Z"dWd?Z#dXdYdBZ$dWdCZ%dIdDZ&dS)ZBaseHTTPResponse)rrdeflateNrrg)i-i.i/i3i4ztuple[type[Exception], ...]DECODER_ERROR_CLASSES)headersretriesr>typing.Mapping[str, str] | typing.Mapping[bytes, bytes] | Nonestatusrversionversion_stringrrreason str | Nonedecode_contentbool request_urlr Retry | Noner#r9ct|tr||_nt||_||_||_||_||_||_d|_||_ ||_ d|_ |j dd } d| dD} d| vrd|_ d|_|dS)NFztransfer-encodingc3>K|]}|VdSr%)rv)rwencs r*rz,BaseHTTPResponse.__init__..Xs*>>SSYY[[>>>>>>r-rzchunkedT) isinstancer rrrrrr_has_decoded_content _request_urlrrrlowerr{_decoder) r)rrrrrrrrtr_enc encodingss r*r@zBaseHTTPResponse.__init__<s g~ . . 3"DLL)'22DL  , ,$)!(3  !!"5r::@@BB>>FLL,=,=>>>  ! !DL/3  )))r-"str | None | typing.Literal[False]cV|j|jvr|jdSdS)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)rREDIRECT_STATUSESrrr/s r*get_redirect_locationz&BaseHTTPResponse.get_redirect_location_s/ ;$0 0 0<##J// /ur-r"ctr%r&r/s r*r!zBaseHTTPResponse.datak!###r- typing.Anyc^|jd}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 `_. 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 `. :returns: The body of the HTTP response as a Python object. zutf-8)r!decode_jsonloadsr(s r*jsonzBaseHTTPResponse.jsonos)$y(({4   r-ctr%r&r/s r*urlzBaseHTTPResponse.urlrr-rctr%r&r)rs r*rzBaseHTTPResponse.urlrr-BaseHTTPConnection | Nonectr%r&r/s r* connectionzBaseHTTPResponse.connectionrr-c|jSr%)_retriesr/s r*rzBaseHTTPResponse.retriess }r-cT||jr|jdj|_||_dS)N)historyredirect_locationrr)r)rs r*rzBaseHTTPResponse.retriess-  7? r*.sAwwyyD$999GGII999r-)rrrrrrur{)r)content_encodingrs` r* _init_decoderzBaseHTTPResponse._init_decoders  <++,>CCIIKK = 4#888 ,-= > > (((-33C88 C$01A$B$BDMMM ! )( CCr-r! flush_decodercf|s|jrtd|S |jr!|j|}d|_nS#|j$rF}|jdd}td|z||d}~wwxYw|r|| z }|S)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.TrrzEReceived response with content-encoding: %s, but failed to decode it.N) rrrr+rrrrr_flush_decoder)r)r!rrrrs r*_decodezBaseHTTPResponse._decodes  ( "<K } 1}//55,0))   #|//0BBGGMMOO ')9:     * D'')) )D s(A BABBc||jr4|jd|jzSdS)zk Flushes the decoder. Should only be called if the decoder is actually being used. r-)rr+r0r/s r*r zBaseHTTPResponse._flush_decoders= = I=++C004=3F3F3H3HH Hsr-brVc|t|}t|dkrdS||dt|<t|Sr~)rr)r)r temps r*readintozBaseHTTPResponse.readintosLyyQ   t99>>1!AkD kNt99 r-r cHtjdtd|jS)Nz|HTTPResponse.getheaders() is deprecated and will be removed in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.rLcategory stacklevel)warningswarnDeprecationWarningrr/s r* getheaderszBaseHTTPResponse.getheaderss1  O'     |r-namedefaultcptjdtd|j||S)NzHTTPResponse.getheader() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default).rLr)rrrrr)r)rrs r* getheaderzBaseHTTPResponse.getheadersA  V'     |g...r-c|jSr%)rr/s r*infozBaseHTTPResponse.infos |r-c|jSr%)rr/s r*geturlzBaseHTTPResponse.geturls xr-)rrrrrrrrrrrrrrrrrr#r9)r#rr2)r#rr#r)rrr#r9)r#r)r#r)rrr#r9rN)rrrrr#rNNFrrrrrrr#r"NNrrrrr#r"rH)r!r"rrrrr#r")r rVr#r)r#r r%)rrrrrr#r)'r3r4r5rr^rrIOErrorr=rBr__annotations__rg ZstdErrorr@rpropertyr!rrsetterrrrrrrrrrrrr r rrrrrr6r-r*rr-s2444 TF"%VH$111:A4:9NNNNN &,03$.!22 SW!%!*!*!*!*!*!*F    $$$X$!!!!*$$$X$ Z$$$Z$$$$X$X ^   ^ FJ$$$$$&*# $$$$$&*$$$$$&*$$$$$$$$$$$$$$$$$$$$$CCCC&</////r-rceZdZdZ dOdPfd' ZdQd(ZdQd)ZedRd+ZedSd,Z dTd-Z dUd.Z dVd0Z e dWd2Z dXd3d4dYd7Z dXd3d4dYd8Z dZd[d;Z d\d]d<Z d^d_d?ZdTd@ZdQdAZdQdBZedTdCZdUdDZdQdEZdTdFZdQdGZd`dHZ d\d_dIZedadJZejdbdLZdcdNZ xZ!S)dra 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. rNrHTTP/?Tbodyr rrrrrrrrrrpreload_contentrroriginal_response_HttplibHTTPResponse | NonepoolHTTPConnectionPool | NonerHTTPConnection | Nonemsg_HttplibHTTPMessage | Nonerrenforce_content_lengthrequest_methodr auto_close sock_shutdown#typing.Callable[[int], None] | Noner#r9c t|||||||| ||_||_d|_d|_| |_d|_| |_|r#t|ttfr||_| |_ | |_ t|dr||_||_d|_|||_t'|_|r$|js|||_dSdSdS)N)rrrrrrrrrrr)superr@r6r8_body_fp_original_response_fp_bytes_readr4rrrr"_pool _connectionr`_sock_shutdown chunk_left _init_lengthlength_remainingr_decoded_bufferr)r)r-rrrrrr.rr/r1rr4rr6r7rr8r9 __class__s r*r@zHTTPResponse.__init__As?* ))#  '=#$ 04"3  Jtc5\22 DJ % 4  DH+'+!% 1 1. A A 011  B4: B.AADJJJ B B B Br-cr|jr|jsdS|j|jd|_dSr%)rBrC _put_connr/s r*rzHTTPResponse.release_connsBz !1 4 T-...r-cx |dS#ttttf$rYdSwxYw)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)rrOSErrorrrr/s r*rzHTTPResponse.drain_connsC   IIKKKKK7L-@    DD s 99r"c\|jr|jS|jr|dSdS)NT)r)r>r?rr/s r*r!zHTTPResponse.datas9 : :  8 1994900 0tr-c|jSr%)rCr/s r*rzHTTPResponse.connections r-c*t|jSr%)rr?r/s r*isclosedzHTTPResponse.isclosedsDH%%%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). )rAr/s r*tellzHTTPResponse.tells ""r-rc|jd}||jrtddS d|dD}t |dkrtd|z|}|dkrd}n#t$rd}YnwxYwd} t|j }n#t$rd}YnwxYw|d vsd |cxkrd ksn|d krd}|S) zM Set initial length value for Response content if available. zcontent-lengthNzReceived 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.c,h|]}t|Sr6)r)rwvals r* z,HTTPResponse._init_length..sIII3s88IIIr-rzrz8Content-Length contained multiple unmatching values (%s)r)i0dHEAD) rrrlogwarningr{rrrrrr)r)r7content_lengthlengthslengthrs r*rFzHTTPResponse._init_lengthsn &*\%5%56F%G%G  %|  t " JI~/C/CC/H/HIIIw<$> 1x~~i000Z\\F"M+? #C 7 7I9$CC -Ix}}Y// T"""+??$$ $  N*-/48>>#&&&tx~~?O?O O*-48==%%%dhmmoo Mr-c||jdSt|jdd}|5|s|||nd}|U|dkrO|sM|j|jr,|j%|jdkrt|j|jn;|r9|dkr|r|jt|kr|jdddn #1swxYwY|rA|xjt|z c_|j|xjt|zc_|S)z7 Reads `amt` of bytes from the socket. NclosedFrir-r) r?getattrrhrtrr6rGrrAr)r)rr fp_closedr!s r* _raw_readzHTTPResponse._raw_read`s 8 4DHh66  " " ! !:CL4==E=222D3!88D8   / U-9-22))STTT !$4+@CII+M+M    = ! ! ! ! ! ! ! ! ! ! ! ! ! ! !@  3   3t99 ,  $0%%T2%% sB.C..C25C2rrcB|||j}|r |dkrd}n6|4d}t|j|kr|j|S||}|dup|dko| }|st|jdkr|S|!||||}|r||_n|s|jrtd|S||||}|j |t|j|krb|r`||}||||}|j |t|j|kr|`|j|}|S)aT Similar to :meth:`http.client.HTTPResponse.read`, but with two additional parameters: ``decode_content`` and ``cache_content``. :param amt: How much of the content to read. If specified, caching is skipped because it doesn't make sense to cache partial content as the full response. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. :param cache_content: If True, will save the returned data such that the same result is returned despite of the state of the underlying file object. This is useful if you want the ``.data`` property to continue working after having ``.read()`` the file object. (Overridden if ``amt`` is set.) NrFr) rrrrHrryr r>rrr)r)rrrr!r decoded_datas r*rzHTTPResponse.reads4   !!0N  5377CC _!M4'((C//+//444~~c""t >q(=X  D011Q66K ;<<nmDDD "! " ,&@ <<nmLLL  $ $\ 2 2 2d*++c11d1~~c**#||D.-PP $((666 d*++c11d1'++C00D r-cr||j}|r|dkrd}|jr^|stdt|jdkr5||jS|j|S|dkrdS||d}|r||S| | }| |||}|j ||s|rn|dd}Q||jS|j|S)a Similar to ``http.client.HTTPResponse.read1`` and documented in :meth:`io.BufferedReader.read1`, but with an additional parameter: ``decode_content``. :param amt: How much of the content to read. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. NrzaCalling read1(decode_content=False) is not supported after read1(decode_content=True) was called.r-Trii ) rrrrrHrrryrr r)r)rrr!rr{s r*rzHTTPResponse.read1sy"  !!0N  377C  $ 5! "=4'((1,,;/77999+//444 !883~~c~.. K  4 $HM<<nmLLL  $ $\ 2 2 2 } >>$d>33D  4 ;'//11 1#'',,,r-rtyping.Generator[bytes]c#lK|jr3|r|||Ed{VdSt|jrt |jdkrK|||}|r|Vt|j1t |jdkIdSdS)a_ A generator wrapper for the read() method. A call will block until ``amt`` bytes have been read from the connection or until the connection is closed. :param amt: How much of the content to read. The generator will return up to much data per iteration, but may return less. This is particularly likely when using compressed data. However, the empty string will never be returned. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. r<Nr)rr)rsupports_chunked_readsrrr?rrHr)r)rrr!s r*rzHTTPResponse.streams$ < D7799 ((^(LL L L L L L L L L L"48,, D4H0I0IA0M0MyySyHHJJJ #48,, D4H0I0IA0M0M0M0M0M0Mr-cdS)NTr6r/s r*readablezHTTPResponse.readable0str-cp|jstd|tjdS)Nz8Cannot shutdown socket as self._sock_shutdown is not set)rDrsocketSHUT_RDr/s r*rzHTTPResponse.shutdown3s9" YWXX X FN+++++r-cd|_|js |jr|j|jr|j|js!t j|dSdSr%)rDrvr?rrCr8rIOBaser/s r*rzHTTPResponse.close8s}"{ tx  HNN      %   " " $ $ $ " IOOD ! ! ! ! ! " "r-c |js$tjj|S|jdSt |jdr|jSt |jdr |jjSdS)NTrQrv)r8rrrv__get__r?r`rQr/s r*rvzHTTPResponse.closedDs} 9#++D11 1 X 4 TXz * * 8$$&& & TXx ( ( 8? "4r-c|jtdt|jdr|jStd)Nz-HTTPResponse has no file to get a fileno fromfilenozOThe file-like object this HTTPResponse is wrapped around has no file descriptor)r?rMr`rr/s r*rzHTTPResponse.filenoQsV 8 IJJ J TXx ( ( 8??$$ $0 r-c|jDt|jdr1t|jdds|jSdSdSdS)Nr0rvF)r?r`rwr0r/s r*r0zHTTPResponse.flush\s\ H '** !DHh66 !8>>## # ! r-c,t|jdS)a Checks if the underlying file-like object looks like a :class:`http.client.HTTPResponse` object. We do this by testing for the fp attribute. If it is present we assume it returns raw chunks as processed by read_chunked(). fp)r`r?r/s r*rz#HTTPResponse.supports_chunked_readsdstx&&&r-cB|jdS|jj}|ddd} t |d|_dS#t $r8||rt||dtddwxYw)N;rrrSzResponse ended prematurely) rEr?rreadliner{rrrrr)r)lines r*_update_chunk_lengthz!HTTPResponse._update_chunk_lengthms ? &4x{##%%zz$""1% L!$mmDOOO L L L JJLLL L(t44$>$$@AAtK Ls AABc"d}|C|j|j}|}|jdd|_n|j7||jkr,|j|}|j|z |_|}n||jkr>|j|}|jdd|_|}n@|j|j}|jdd|_|S)NrL)r? _safe_readrE)r)rreturned_chunkrvalues r* _handle_chunkzHTTPResponse._handle_chunks ;H''88E"N H   " " ""DOO _ (S4?-B-BH'',,E"o3DO"NN DO # #H'',,E H   " " ""DO"NN!X00AAN H   " " ""DOr-c#XK||jstd|st d|5|jr;t|jr'|j ddddS|j j  ddddS|r|dkrd} | |j dkrn4| |}|||d}|r|VT|r|}|r|V|j /|j j }|sn|dkrn|j /|jr|jddddS#1swxYwYdS) a Similar to :meth:`HTTPResponse.read`, but with an additional parameter: ``decode_content``. :param amt: How much of the content to read. If specified, caching is skipped because it doesn't make sense to cache partial content as the full response. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. zHResponse is not chunked. Header 'transfer-encoding: chunked' is missing.zkBody should be http.client.HTTPResponse like. It should have have an fp attribute which returns raw chunks.NrTF)rrs )rrrrrrhr@rrr?rrrErr r r)r)rrrdecodedrs r*rzHTTPResponse.read_chunkeds | $B **,, *P   " ". 0. 0& +>t?V+W+W '--/// . 0. 0. 0. 0. 0. 0. 0. 0x{". 0. 0. 0. 0. 0. 0. 0. 0 sQww "))+++?a''**3//,,.'"!MMM " "--//"!MMM(&x{++--7?? (&& 0'--///]. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0s$6F' FCFF#&F#c|jS)z Returns the URL that was the source of this response. If the request that generated this response redirected, this method will return the final redirect location. rr/s r*rzHTTPResponse.urls   r-rc||_dSr%rrs r*rzHTTPResponse.urlsr-rc#jKg}|dD]|}d|vra|d}d||dzdzV|ddD] }|dzV |dr |dg}dg}g||}|rd|VdSdS)NTr< r-rrr)rr{rlrk)r)rrchunksxs r*__iter__zHTTPResponse.__iter__s [[[55 % %E~~U++hhv&&2U::::"$$Ae)OOOO": $Rj\FFFF e$$$$  #((6"" " " " " " # #r-)rNrrr,NTTNNNNNTNNTN)&r-r rrrrrrrrrrrr.rrrr/r0r1r2rr3r4r5rrr6rr7rrrr8rr9r:r#r9rHr2)r#r3)r#rr)r7rr#r)r#rar%)rrrrr#r"r"r#r$r%r!)rrrrr#r})rrr#r"r )rrrr#r9)r#r)"r3r4r5rr@rrr)r!rrQrSrFrrhrtryrrrrrrrvrr0rrrrrr*r __classcell__)rIs@r*rr sbDRV&! $#9=*.,0*. $'+%)"&=A'>B>B>B>B>B>B>B@        X   X &&&&####6666p?$?$?$^?$F7N 7N7N7N7N7N7Nv2 222222l&*# HHHHHX&*4-4-4-4-4-nFJ8,,,, " " " "   X     $$$$''''LLLL$.EIK0K0K0K0K0Z!!!X! Z   Z ########r-r)rrrr#r )Q __future__rrrrrloggingrerrntypingrr= contextlibr http.clientr_HttplibHTTPMessager_HttplibHTTPResponserrc TYPE_CHECKING_base_connectionr brotlicffir^ ImportError zstandardrgtuplemaprsearch __version__groups _zstd_versionrAttributeErrorrrr r _collectionsr rrrr exceptionsrrrrrrrrrr util.responserr util.retryrconnectionpoolr getLoggerr3r\r r8rKrQr\rerprurrrr6r-r*rs""""""   %%%%%%::::::<<<<<<++++++ 5444444#####   FFFE C143CDDKKMMNNMw  Z0HHH((((((((((((CCCCCCCCCC                        =<<<<<<< 3222222g!!$$$$$$$$!!!!!^!!!@ !!!!!.!!!< " n*>*$FFFFFFFFRppppprypppf^ #^ #^ #^ #^ ##^ #^ #^ #^ #^ #sBAA+ A'$A+&A''A++A54A59C CC