epSrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK r SSK r SSK J r /SQrSrSrSrSrS rS r\"5R-\R.R05 \R.R0R35Vs0sHoUR4_M snrS rS r\R<"S 5R>r \R<"S5RBr"\R<"S5r#\R<"S5r$1Skr%S>Sjr&S\'S\'4Sjr("SS\RRRT5r+Sr,\+4Sjr-\+4Sjr."SS\R^5r0Sr1"SS5r2SSK3r3"S S!\25r4\RkS!5 "S"S#\75r8"S$S%\85r9"S&S'\85r:"S(S)\85r;"S*S+\85r<"S,S-\85r="S.S/\85r>"S0S1\85r?"S2S3\?5r@"S4S5\?5rA"S6S7\?5rB"S8S9\85rC"S:S;\85rD"S<S=\E\C5rF\8rGgs snf!\6a Nf=f)?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) HTTPResponseHTTPConnection HTTPException NotConnectedUnknownProtocolUnknownTransferEncodingUnimplementedFileModeIncompleteRead InvalidURLImproperConnectionStateCannotSendRequestCannotSendHeaderResponseNotReady BadStatusLine LineTooLongRemoteDisconnectederror responsesPiUNKNOWNIdlezRequest-startedz Request-sentids[^:\s][^:\r\n]*s\n(?![ \t])|\r(?![ \t\n])z[- ]z[-]>PUTPOSTPATCHc URS5$![ann[URURURUR UR 5<SXRUR <SSU<S35SeSnAff=f)zrrA _MAXHEADERSr)fpheadersrFs r) _read_headersrXst G {{8a<( t9x m, ,t w<+ % :[ HI I ( (  N r6cSRU5RS5n[RR US9R U5$)a. Parses only RFC2822 headers from header lines. 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. r6 iso-8859-1)_class)joindecodeemailparserParserparsestr) header_linesr[hstrings r)_parse_header_linesrds@hh|$++L9G <<  f  - 6 6w ??r6c.[U5n[X!5$)z0Parses only RFC2822 headers from a file pointer.)rXrd)rVr[rWs r) parse_headersrfsBG w //r6c^\rSrSrS!SjrSrSrSrSrU4Sjr U4Sjr S r S r S"S jr S rS rSrSrS"SjrSrSrSrS#SjrS#SjrS#U4SjjrSrSrSrS"SjrSrSrSrSr Sr!S r"U=r#$)$rcURS5UlX lX0lS=UlUl[ Ul[ Ul[ Ul [ Ul [ Ul [ Ul [ Ul g)Nrb)makefilerV debuglevel_methodrWmsg_UNKNOWNversionstatusreasonchunked chunk_leftlength will_close)rBsockrlmethodurls r)__init__HTTPResponse.__init__sa--%$ #'& tx     " "r6c[URR[S-5S5n[ U5[:a [ S5eUR S:a[S[U55 U(d [S5eURSS5up#nURS 5(dUR5 [U5e[W5nUS :dUS :a [U5eX#W4$![a- URSS5up#SnN|![a SnNf=ff=f![a [U5ef=f) Nr<rZz status linerzreply:z-Remote end closed connection without responsezHTTP/ri)strrVrSrTr>rrlprintreprrsplit ValueErrorr2 _close_connrint)rBrFrprqrrs r) _read_statusHTTPResponse._read_status#sA477##HqL1<@ t9x m, , ??Q  (DJ '%&12 2 &*jjq&9 #GV!!'**    % % &[F|v|#D)) ,&&%  "&**T1"5      &% % &s6C1 "D+1 D(<D D$ D(#D$$D(+EcURbgUR5upnU[:waO4[UR5nUR S:a [ SU5 AMRU=UlUlUR5Ul US;aSUl O)URS5(aSUl O [U5e[UR5=UlUlUR S:a3URR!5HupV[ SUS -U5 M URR#S 5nU(a#UR%5S :XaSUlSUlOS UlUR+5UlSUlURR#S 5nU(a:UR&(d)[1U5UlUR.S:aSUlOSUlU[4:Xd)U[6:XdSUs=::aS:dO UR8S:XaSUlUR,(d(UR&(dUR.cSUlgggg![2a SUlNf=f)NTrzheaders:)zHTTP/1.0zHTTP/0.9 zHTTP/1. header:r;transfer-encodingrsFcontent-lengthrHEAD)rWrCONTINUErXrVrlrcoderqstriprrrpr2rrfrnitemsgetr=rsrt _check_closervrurr NO_CONTENT NOT_MODIFIEDrm) rBrprqrrskipped_headershdrvaltr_encrus r)beginHTTPResponse.beginDs << # &*&7&7&9 #GV!+DGG4O"j/2#)( DKlln . .DL    * *DL!'* *"/"88 tx ??Q  LL..0isC01!!"56 flln 1DL"DO DL++- !!"23 $,, '!&k ;;?"&DKDK j Fl$: 6 C  LLF "DK  KK "DO  # #"  #s<II32I3c|URRS5nURS:XaU(aSUR5;aggURRS5(agU(aSUR5;agURRS5nU(aSUR5;agg)N connectionrcloseTFz keep-alivezproxy-connection)rWrrpr=)rBconnpconns r)rHTTPResponse._check_closes|| - <<2 4::</ <<  L ) ) LDJJL0   !34 \U[[]2r6cJURnSUlUR5 gN)rVr)rBrVs r)rHTTPResponse._close_conns WW  r6c>[TU]5 UR(aUR5 gg!UR(aUR5 ff=fr)superrrVrrB __class__s r)rHTTPResponse.closesB # GMOww  "tww  "s 4$Acz>[TU]5 UR(aURR5 ggr)rflushrVrs r)rHTTPResponse.flushs%   77 GGMMO r6cg)zAlways returns TrueTrIrBs r)readableHTTPResponse.readablesr6cURSL$)z!True if the connection is closed.N)rVrs r)isclosedHTTPResponse.isclosedsww$r6cURcgURS:XaUR5 gUR(aUR U5$UbUS:aUR bXR :a UR nURR U5nU(dU(aUR5 U$UR b?U=R [U5-slUR (dUR5 U$UR cURR 5nO#URUR 5nSUlUR5 U$![a UR5 ef=f)z?Read and return the response body, or up to the next amt bytes.r6rr) rVrmrrs _read_chunkedrureadr> _safe_readr )rBamtss r)rHTTPResponse.reads6 77? <<6 !     <<%%c* * ?sax{{&3+<kk S!A  " H ( s1v% {{$$&H{{"GGLLN 4A     H &$$&s 5E))Fc URcgURS:XaUR5 gUR(aUR U5$UR b1[ U5UR :a[U5SUR nURRU5nU(dU(aUR5 U$UR b6U=R U-slUR (dUR5 U$)zNRead up to len(b) bytes into bytearray b and return the number of bytes read. rr) rVrmrrs_readinto_chunkedrur> memoryviewreadinto)rBbrCs r)rHTTPResponse.readintos 77? <<6 !     <<))!, , ;; "1v #qM!DKK0 GG  Q Q      [[ $ KK1 K;;  "r6cURR[S-5n[U5[:a [ S5eUR S5nUS:aUSUn[ US5$![a UR5 ef=f)Nr<z chunk size;r) rVrSrTr>rfindrrr)rBrFis r)_read_next_chunk_size"HTTPResponse._read_next_chunk_sizesww1 - t9x l+ + IIdO 68D tR=         s  A**BcURR[S-5n[U5[:a [ S5eU(dgUS;agMQ)Nr<z trailer linerP)rVrSrTr>rrBrFs r)_read_and_discard_trailer&HTTPResponse._read_and_discard_trailer)sO77##HqL1D4y8#!.11,,r6cURnU(dSUbURS5 UR5nUS:Xa"UR 5 UR 5 SnXlU$![a [ S5ef=f)Nr}r6r)rtrrrr rr)rBrts r)_get_chunk_leftHTTPResponse._get_chunk_left7s __ %" *!779 Q..0  "! (O *$S)) *s A))A?cUR[:wdeUbUS:aSn/nUR5=nbuUb/X::a*URUR U55 X1- UlOCURUR U55 UbX-nSUlUR5=nbMuSR U5$![a n[SR U55UeSnAff=fNrr6)rsrorrArrtr\r )rBrvaluertexcs r)rHTTPResponse._read_chunkedOs||x''' ?sQwC ;!%!5!5!77:D?s'8LL!56&0&6DO T__Z89?%C"#"&!5!5!77:D88E? " ; %1s : ;sBB>-B>> C(C##C(chUR[:wdeSn[U5nUR5nUcU$[ U5U::aUR U5nXE- UlX%-$USUnUR U5nX5SnX%- nSUlMi![a [[USU55ef=f)Nr) rsrorrr>_safe_readintortr bytes)rBr total_bytesmvbrtrCtemp_mvbs r)rHTTPResponse._readinto_chunkedcs||x''' m :!113 %&&s8z)++C0A&0nDO&?*{ +''1"g "#  : q;'7!89 9 :sB,B('B"B1cURRU5n[U5U:a[X![U5- 5eU$)zRead the number of bytes requested. This function should be used when bytes "should" be present for reading. If the bytes are truly not available (due to EOF), then the IncompleteRead exception can be used to detect the problem. )rVrr>r )rBrr&s r)rHTTPResponse._safe_read{s9ww||C  t9s? 3t9}5 5 r6c[U5nURRU5nX2:a[[ USU5X#- 5eU$)z2Same as _safe_read, but for reading into a buffer.N)r>rVrr r)rBrrrCs r)rHTTPResponse._safe_readintosB!f GG  Q  7 q!usu5 5r6cURbURS:XagUR(aURU5$URb!US:dXR:a URnURR U5nU(dU(aUR 5 U$URb?U=R[U5-slUR(dUR 5 U$)zfRead with at most one underlying system call. If at least one byte is buffered, return that instead. rr6r)rVrmrs_read1_chunkedruread1rr>)rBrCresults r)rHTTPResponse.read1s 77?dllf4 <<&&q) ) ;; "A[[ Aq!!      [[ $ KK3v; &K;;  " r6cURbURS:XagUR(aURU5$URR U5$)Nrr6)rVrmrs _peek_chunkedpeek)rBrCs r)rHTTPResponse.peeksE 77?dllf4 <<%%a( (ww||Ar6c>URbURS:XagUR(a[TU]U5$UR b!US:dXR :a UR nURR U5nU(dU(aUR 5 U$UR b?U=R [U5-slUR (dUR 5 U$)Nrr6r)rVrmrsrrSrurr>)rBlimitrrs r)rSHTTPResponse.readlines 77?dllf4 <<7#E* * ;; " U[[5HKKE!!%(%      [[ $ KK3v; &K;;  " r6cUR5nUbUS:XagSUs=::aU::dO UnURRU5nU=R[ U5-slU(d [ S5eU$r)rrVrrtr>r )rBrCrtrs r)rHTTPResponse._read1_chunkedsj))+  aQ$*$Aww}}Q 3t9$ % % r6cUR5nUcgURRU5SU$![a gf=f)Nr6)rr rVr)rBrCrts r)rHTTPResponse._peek_chunkedsP --/J  ww||J' 44   s4 AAc6URR5$r)rVfilenors r)rHTTPResponse.filenosww~~r6cURc [5eURRU5=(d Un[U[5(d[ US5(dU$SR U5$)aHReturns the value of the header matching *name*. If there are multiple matching headers, the values are combined into a single string separated by commas and spaces. If no matching header is found, returns *default* or None if the *default* is not specified. If the headers are unknown, raises http.client.ResponseNotReady. __iter__z, )rWrget_all isinstancerhasattrr\)rBr'defaultrWs r) getheaderHTTPResponse.getheaders] << "$ $,,&&t,7 gs # #77J+G+GN99W% %r6cvURc [5e[URR55$)z&Return list of (header, value) tuples.)rWrlistrrs r) getheadersHTTPResponse.getheaderss- << "$ $DLL&&())r6cU$rrIrs r)rHTTPResponse.__iter__s r6cUR$)aReturns an instance of the class mimetools.Message containing meta-information associated with the URL. When the method is HTTP, these headers are those returned by the server at the head of the retrieved HTML page (including Content-Length and Content-Type). When the method is FTP, a Content-Length header will be present if (as is now usual) the server passed back a file length in response to the FTP retrieval request. A Content-Type header will be present if the MIME type can be guessed. When the method is local-file, returned headers will include a Date representing the file's last-modified time, a Content-Length giving file size, and a Content-Type containing a guess at the file's type. See also the description of the mimetools module. )rWrs r)infoHTTPResponse.infos*||r6cUR$)a*Return the real URL of the page. In some cases, the HTTP server redirects a client to another URL. The urlopen() function handles this transparently, but in some cases the caller needs to know which URL the client was redirected to. The geturl() method can be used to get at this redirected URL. )ryrs r)geturlHTTPResponse.geturls xxr6cUR$)zeReturn the HTTP status code that was sent with the response, or None if the URL is not an HTTP URL. )rqrs r)getcodeHTTPResponse.getcodes {{r6) rmrtrsrrlrVrWrurnrrrqrprv)rNNr))$rJrKrLrMrzrrrrrrrrrrrrrrrrrrrrSrrrrrrrrr rN __classcell__rs@r)rrs#<'BF#P: #  &P D 0;(:0 &"  5 &(* . r6rc[R"5nUS:XaURS/5 URbSUlU$)Nrzhttp/1.1T)ssl_create_default_https_contextset_alpn_protocolspost_handshake_auth) http_versioncontexts r)_create_https_contextr&sC//1Gr""J<0"".&*# Nr6c"\rSrSrSrSr\r\r Sr Sr \ S5r \ S5rS\R SS 4S jrS$S jrS rS rSrSrSrSrSrSrSrSrS%SjrS&SjrSrSr Sr!Sr"Sr#S'SS.Sjjr$S04SS.S jjr%S!r&S"r'S#r(g)(ri3rzHTTP/1.1r<rc6[U[R5$)zFTest whether a file-like object is a text or a binary stream. )rio TextIOBase)streams r) _is_textIOHTTPConnection._is_textIO=s&"--00r6cUcUR5[;agg[US5(ag[U5nUR$![ a Of=f[ U[5(a [U5$g)zGet the content-length based on the body. If the body is None, we set Content-Length: 0 for methods that expect a body (RFC 7230, Section 3.3.2). We also set the Content-Length for any method if the body is a str or bytes-like object and not a file. Nrr) upper_METHODS_EXPECTING_BODYrrnbytes TypeErrorrrr>)bodyrxmvs r)_get_content_length"HTTPConnection._get_content_lengthCsw <||~!88 4  D!B99     dC t9 sA AAN cJX0lX@lXPlSUl/UlSUl[ UlSUlSUl SUl 0Ul SUl URX5uUlUlUR!UR5 ["R$Ulgr)timeoutsource_address blocksizerw_buffer_HTTPConnection__response_CS_IDLE_HTTPConnection__staterm _tunnel_host _tunnel_port_tunnel_headers_raw_proxy_headers _get_hostporthostport_validate_hostsocketcreate_connection_create_connection)rBr4r5r(r)r*s r)rzHTTPConnection.__init__cs ,"      !"&!%!3!3D!?DI DII&#)":":r6cUR(a [S5eURX5uUlUlU(aUR 5UlOUR R5 [SUR 55(dHURRS5RS5nSX@R4-UR S'gg)aySet up host and port for HTTP CONNECT tunnelling. In a connection that uses HTTP CONNECT tunnelling, the host passed to the constructor is used as a proxy server that relays all communication to the endpoint passed to `set_tunnel`. This done by sending an HTTP CONNECT request to the proxy server when the connection is established. This method must be called before the HTTP connection has been established. The headers argument should be a mapping of extra HTTP headers to send with the CONNECT request. As HTTP/1.1 is used for HTTP CONNECT tunnelling request, as per the RFC (https://tools.ietf.org/html/rfc7231#section-4.3.6), a HTTP Host: header must be provided, matching the authority-form of the request target provided as the destination for the CONNECT request. If a HTTP Host: header is not provided via the headers argument, one is generated and transmitted automatically. z.Can't set up tunnel for established connectionc3F# UHoR5S:Hv M g7f)r4Nr=).0headers r) ,HTTPConnection.set_tunnel..sO:N<<>V+:Ns!idnaasciiz%s:%dHostN) rw RuntimeErrorr3r/r0copyr1clearanyrr])rBr4r5rW encoded_hosts r) set_tunnelHTTPConnection.set_tunnelzs, 99OP P/3/A/A$/M,4, #*<<>D  & & (O$:N:NOOO,,33F;BB7KL+2//61,1D  (Pr6cRUcJURS5nURS5nX4:a[XS-S5nUSUnO URnU(aUSS:XaUSS:XaUSSnX4$![a- XS-SS:XaURnNV[ SXS-S-5ef=f) Nr;]r<r~znonnumeric port: '%s'r[r )rfindrr default_portr )rBr4r5rjs r)r3HTTPConnection._get_hostports < 3A 3AuOtaCDz?D BQx(( DGsNtBx3":D|"OaCDzR'#00()@4!:)MNN OsA//!B&B&cXlgr)rl)rBlevels r)set_debuglevelHTTPConnection.set_debuglevelsr6c4SU;aUSS:waSU-S-$U$)N:r[r/r0rI)rBips r) _wrap_ipv6HTTPConnection._wrap_ipv6s( 2:"Q%7*"9t# # r6cSURURRS55URURRS54-nU/nUR R 5H+up4URUSUS3RS55 M- URS5 URSRU55 AURURURS 9nUR5upgn[UR5UlUR"S :a-UR Hn[%S UR'55 M U[(R*R,:wa/UR/5 [1S US UR3535eUR/5 g!UR/5 f=f)NsCONNECT %s:%d %s rBrCz:  rrQr6rxrrzTunnel connection failed:  )r[r/rr0 _http_vsn_strr1rrAsendr\response_classrwrmrrXrVr2rlrr]http HTTPStatusOKrOSErrorr) rBconnectrWr?rresponserprmessages r)_tunnelHTTPConnection._tunnels) OOD--44V< =       % %g .-00)!11779MF NNfXRwd3::9E F:w #((7#$ &&tyy&F '/'<'<'> $WG&3HKK&@D #""55F)V]]_56t)))  :4&'--/ARSTT* NN HNN s 7B7GGcJURb[UR5$S$)z Returns a dictionary with the headers of the response received from the proxy server to the CONNECT request sent to set the tunnel. If the CONNECT request was not sent, the method returns None. N)r2rdrs r)get_proxy_response_headers)HTTPConnection.get_proxy_response_headerss/&&2  7 7 8  r6c[R"SXRUR5 UR URUR4UR UR 5UlURR[R[RS5 UR(aUR!5 gg![a)nUR[R:waeSnANQSnAff=f)z3Connect to the host and port specified in __init__.zhttp.client.connectr<N)sysauditr4r5r9r(r)rw setsockoptr7 IPPROTO_TCP TCP_NODELAYrgerrno ENOPROTOOPTr/rkrBes r)rhHTTPConnection.connects 'yy$))D++ YYtyy !4<<1D1DF   II !3!3V5G5G K    LLN   ww%+++, s09C C?C::C?c&[UlURnU(aSUlUR5 URnU(aSUlUR5 gg!URnU(aSUlUR5 ff=f)z(Close the connection to the HTTP server.N)r-r.rwrr,)rBrwris r)rHTTPConnection.closesr  !99D   H"& H"& s *A##-BcURc,UR(aUR5 O [5eURS:a[ S[ U55 [US5(aURS:a [ S5 URU5nU(aURS:a [ S5 URUR5=n(anU(aURS5n[R"SX5 URRU5 URUR5=n(aMng[R"SX5 URRU5 g![ag [!U["R$R&5(a&UHnURRU5 M g[S [)U5-5ef=f) zSend `data' to the server. ``data`` can be a string object, a bytes object, an array object, a file-like object that supports a .read() method, or an iterable object. Nrzsend:rzsending a readableencoding file using iso-8859-1rZzhttp.client.sendz9data should be a bytes-like object or an iterable, got %r)rw auto_openrhrrlrrrrrr*rrqrrsendallr!r collectionsabcIterabletype)rBr&r datablockds r)rbHTTPConnection.sends 99 ~~ "n$ ??Q  '4: & 4 "*+__T*F$//A-67#yy88)8 ) 0 0 >I ,d> !!), $yy88)8  $d1 G II  d # G$  8 899AII%%a( !9;?:!FGG  Gs'FAG4G4c:URRU5 g)zeAdd a line of output to the current request buffer. Assumes that the line does *not* end with \r\n. N)r+rA)rBrs r)_outputHTTPConnection._output*s Ar6c#n# URS:a [S5 URU5nU(aURS:a [S5 URUR5=n(aAU(aUR S5nUv URUR5=n(aM@gg7f)Nrzreading a readabler~rZ)rlrrrr*r)rBrrrs r)_read_readableHTTPConnection._read_readable1s ??Q  & '* doo) 2 3#==88i8%,,\: O$==88i88s B/B53B5FcURRS5 SRUR5nURSS2 URU5 Ub[ US5(aUR U5nO[ U5 U4nUHsnU(dURS:a [S5 M'U(a4URS:Xa$[U5S S 3RS 5U-S-nURU5 Mu U(a#URS:XaURS 5 gggg![a4 [U5nN![a [S[U5-5ef=ff=f) zSend the currently buffered request and clear the buffer. Appends an extra \r\n to the buffer. A message_body may be specified, to be appended to the request. )r6r6rQNrzAmessage_body should be a bytes-like object or an iterable, got %rrzZero length chunk ignoredrXr^rCs0 )r+extendr\rbrrrr!iterrrlr _http_vsnr>r)rB message_bodyencode_chunkedrnchunkschunks r) _send_outputHTTPConnection._send_output<s^ J'll4<<( LLO #  #|V,,,,\:- |,+_F*9:!dnn&:"5z!nD188AEI!"E %  $..B"6 ,'#7~O $!>>!%l!3$>')H*.|*<)=>>>>s> D11 E/< E  "E++E/cUR(a&URR5(aSUlUR[:Xa [UlO[ UR5eUR U5 XlU=(d SnURU5 U<SU<SUR<3nURURU55 URS:XGaBU(GdSnURS5(a[U5upv nU(a.URS5nUR#S [%U55 OUR&(aUR&n UR(n OUR*n UR,n U RS5n UR/U 5n S U ;a [%U 5n XR0:XaUR#S U 5 O*U R3S5n UR#S U <S U <35 U(dUR#S S 5 ggg![ a URS5nGNf=f![ a U RS5n Nf=f) a0Send a request to the server. `method' specifies an HTTP request method, e.g. 'GET'. `url' specifies the object being requested, e.g. '/index.html'. `skip_host' if True does not add automatically a 'Host:' header `skip_accept_encoding' if True does not add automatically an 'Accept-Encoding:' header N/r`rr~rdrCrBrDr;zAccept-Encodingidentity)r,rr.r-_CS_REQ_STARTEDr_validate_methodrm_validate_pathrar_encode_requestrr2rrr putheaderr5r/r0r4r5r[rPr]) rBrxry skip_hostskip_accept_encodingrequestnetlocnil netloc_encr4r5host_encs r) putrequestHTTPConnection.putrequestrs ??t7799"DO* <<8 #*DL#DLL1 1 f% jS C &T-?-?@ T))'23 >>R >>&))19#.Cc3;%+]]7%; NN6+000vx8#+??7#;v(D/IJ(0*=( c.;%+]]6%: ;.7#';;v#67s$ H+I +I  I  I+*I+c$URS5$)NrC)r)rBrs r)rHTTPConnection._encode_requests~~g&&r6c[RU5nU(a"[SU<SUR5<S35eg)z&Validate a method name for putrequest.z)method can't contain control characters.  (found at least )N)$_contains_disallowed_method_pchar_researchrgroup)rBrxmatchs r)rHTTPConnection._validate_methodsI5;;FC ?zJ'',{{}&7q:; ; r6c[RU5nU(a"[SU<SUR5<S35eg)zValidate a url for putrequest.&URL can't contain control characters. rrN!_contains_disallowed_url_pchar_rerr r)rBryrs r)rHTTPConnection._validate_pathsL288= EcWM005 /@CD D r6c[RU5nU(a"[SU<SUR5<S35eg)z9Validate a host so it doesn't contain control characters.rrrNr)rBr4rs r)r6HTTPConnection._validate_hostsL288> EdXN005 /@CD D r6cFUR[:wa [5e[US5(aUR S5n[ U5(d[ SU<35e[U5n[U5H~up4[US5(aUR S5X#'O1[U[5(a[U5R S5X#'[X#5(dMo[ SX#<35e SRU5nUS-U-nURU5 g) z[Send a request header line to the server. For example: h.putheader('Accept', 'text/html') rrCzInvalid header name rzInvalid header value s s: N)r.rrrr_is_legal_header_namerr enumeraterrr_is_illegal_header_valuer\r)rBr?valuesr one_valuers r)rHTTPConnection.putheaders <ks r)r@/HTTPConnection._send_request..>s #'0N0N $;."1H(  @    !#GJ 4(l16(-}~';DD8 Ge G)-bG$G ,=\=r6rcb^\rSrSrSr\rS \RSSSS.U4Sjjjr U4Sjr Sr U=r $) HTTPSConnectioniz(This class allows communication via SSL.Nr&)r(r)rr*cj>[[U] XUUUS9 Uc[UR5nXPlg)N)r*)rrrzrr_context)rBr4r5r(r)rr*rs r)rzHTTPSConnection.__init__s> /4 1$g2@[TU]5 UR(a URnO URnURR UR US9Ulg)z(Connect to a host on a given (SSL) port.)server_hostnameN)rrhr/r4r wrap_socketrw)rBrrs r)rhHTTPSConnection.connectsQ GO   "&"3"3"&)) 11$))BQ2SDIr6)rrwr) rJrKrLrM__doc__ HTTPS_PORTrPr7rrzrhrNr r s@r)rrs62!  $ & > >$($$ $ $ S Sr6rc\rSrSrSrg)rirINrJrKrLrMrNrIr6r)rrs r6rc\rSrSrSrg)rirINrrIr6r)rrr6rc\rSrSrSrg)r irINrrIr6r)r r rr6r c\rSrSrSrSrg)ric U4UlXlgrargsrp)rBrps r)rzUnknownProtocol.__init__sH  r6rNrJrKrLrMrzrNrIr6r)rrsr6rc\rSrSrSrg)r irINrrIr6r)r r rr6r c\rSrSrSrg)r irINrrIr6r)r r rr6r c<\rSrSrSSjrSr\RrSrg)r iNc,U4UlXlX lgr)rpartialexpected)rBrrs r)rzIncompleteRead.__init__sH   r6cURbSUR-nOSnSURR[UR5U4-$)Nz, %i more expectedr~z%s(%i bytes read%s))rrrJr>rrxs r)__repr__IncompleteRead.__repr__sK == $$t}}4AA$(?(?(+DLL(91(>> >r6)rrrr) rJrKrLrMrzrr"__str__rNrIr6r)r r s!>nnGr6r c\rSrSrSrg)r irINrrIr6r)r r rr6r c\rSrSrSrg)rirINrrIr6r)rrrr6rc\rSrSrSrg)rirINrrIr6r)rrrr6rc\rSrSrSrg)rirINrrIr6r)rrrr6rc\rSrSrSrSrg)ricDU(d [U5nU4UlXlgr)rrrFrs r)rzBadStatusLine.__init__s:DE  r6)rrFNrrIr6r)rrsr6rc\rSrSrSrSrg)ricB[RUS[U4-5 g)Nz&got more than %d bytes when reading %s)rrzrT)rB line_types r)rzLineTooLong.__init__s"t%M(0)'<&= >r6rINrrIr6r)rrs>r6rc\rSrSrSrSrg)ricd[RUS5 [R"U/UQ70UD6 g)Nr~)rrzConnectionResetError)rBposkws r)rzRemoteDisconnected.__init__ s*tR(%%d7S7B7r6rINrrIr6r)rrs8r6r)r&)Hr email.parserr^ email.messagervrdrrer7rqcollections.abcr urllib.parser__all__rrror-rrglobalsupdatere __members__rphraserrTrUcompile fullmatchrrrrrrr*rr5rjMessager8rXrdrfBufferedIOBaserrrrrrA ImportError Exceptionrrr rr r r r rrrrrr rr)vs0r)rsmDL !     #  ,,-#'//"="="D"D"F G"FQ["F G   6 #67AA::&CDKK%'JJ/@$A!(*zz-'@$3 E%%--''<$.9 @)0g2$$gT t t l!&S.S8 NN$% I  =   m  m  M  ]  m  /  .  . M>-> 8-}8 E- H~)  s H')H,,H54H5