Files
PowerToys/PythonHome/Lib/httplib.pyc

280 lines
37 KiB
Plaintext
Raw Normal View History

2014-07-09 18:15:23 +08:00
<03>
H<EFBFBD>wSc@stdZddlmZddlZddlZddlmZddlmZddlZej <00><00>-er<>ej
dde <00>nddl Z WdQXyddl mZWn!ek
r<>ddlmZnXd d
d d d ddddddddddddgZdZdZdZdZdZdZd Zd!Zd"Zd#Zd$Zd%Zd&Zd'Zd(Zd)Z d*Z!d+Z"d,Z#d-Z$d.Z%d/Z&d0Z'd1Z(d2Z)d3Z*d4Z+d5Z,d6Z-d7Z.d8Z/d9Z0d:Z1d;Z2d<Z3d=Z4d>Z5d?Z6d@Z7dAZ8dBZ9dCZ:dDZ;dEZ<dFZ=dGZ>dHZ?dIZ@dJZAdKZBdLZCdMZDdNZEdOZFdPZGi)dQd 6dRd!6dSd#6dTd$6dUd%6dVd&6dWd'6dXd(6dYd)6dZd,6d[d-6d\d.6d]d/6d^d06d_d16d`da6dbd26dcd36ddd46ded56dfd66dgd76dhd86did96djd:6dkd;6dld<6dmd=6dnd>6dod?6dpd@6dqdA6drdB6dsdC6dtdD6dudI6dvdJ6dwdK6dxdL6dydM6dzdN6ZHd{ZId|ZJd}e jKfd~<00><00>YZLd
fd<00><00>YZMd fd<><00><00>YZNd fd<><00><00>YZOyddlPZPWnek
r<>nCXd<58>eNfd<><00><00>YZQejRd<><00>d<>eOfd<><00><00>YZSd<><00>ZTd eUfd<><00><00>YZVd eVfd<><00><00>YZWdeVfd<><00><00>YZXdeVfd<><00><00>YZYdeVfd<><00><00>YZZdeVfd<><00><00>YZ[deVfd<><00><00>YZ\deVfd<><00><00>YZ]de]fd<><00><00>YZ^de]fd<><00><00>YZ_de]fd<><00><00>YZ`deVfd<><00><00>YZad<>eVfd<><00><00>YZbeVZcd<>fd<><00><00>YZddS(<28>s<> HTTP/1.1 client library
<intro stuff goes here>
<other stuff, too>
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 <response_class>
Req-started-unread-response _CS_REQ_STARTED <response_class>
Req-sent-unread-response _CS_REQ_SENT <response_class>
i<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(tarrayN(t py3kwarning(turlsplittignores.*mimetools has been removed(tStringIOtHTTPt HTTPResponsetHTTPConnectiont HTTPExceptiont NotConnectedtUnknownProtocoltUnknownTransferEncodingtUnimplementedFileModetIncompleteReadt
InvalidURLtImproperConnectionStatetCannotSendRequesttCannotSendHeadertResponseNotReadyt BadStatusLineterrort responsesiPi<>tUNKNOWNtIdlesRequest-starteds Request-sentidieifi<>i<>i<>i<>i<>i<>i<>i<>i<>i,i-i.i/i0i1i3i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>i<>tContinuesSwitching ProtocolstOKtCreatedtAcceptedsNon-Authoritative Informations
2014-07-10 23:57:08 +08:00
No Contents Reset ContentsPartial ContentsMultiple ChoicessMoved PermanentlytFounds See Others Not Modifieds Use Proxys(Unused)i2sTemporary Redirects Bad Requestt UnauthorizedsPayment Requiredt Forbiddens Not FoundsMethod Not AllowedsNot AcceptablesProxy Authentication RequiredsRequest TimeouttConflicttGonesLength RequiredsPrecondition FailedsRequest Entity Too LargesRequest-URI Too LongsUnsupported Media TypesRequested Range Not SatisfiablesExpectation FailedsInternal Server ErrorsNot Implementeds Bad GatewaysService UnavailablesGateway TimeoutsHTTP Version Not Supportediit HTTPMessagecBs#eZd<00>Zd<00>Zd<00>ZRS(cCsT|jj|<00>}|dkr.||j|<n"dj||f<00>}||j|<dS(s*Add header for field key handling repeats.s, N(tdicttgettNonetjoin(tselftkeytvaluetprevtcombined((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt addheader<65>s
2014-07-09 18:15:23 +08:00
 cCs&|j|}|d||j|<dS(s-Add more field data from a continuation line.s
2014-07-10 23:57:08 +08:00
N(R"(R&R'tmoreR)((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt addcontinue<75>s cCsRi|_d|_g|_}d|_d}d}d }}}t|jd<00>rc|jj}n|jr{|jj }nx<>t
2014-07-09 18:15:23 +08:00
rM|r<>y |<00>}Wq<57>t k
r<>d }}d|_q<>Xn|jj t d<17>}t|<00>t kr<>td<00><00>n|s d|_Pn|r6|jd<00>r6|j||_q~nd}|r{|ddkr{|j|<00>|j||j<00><00>q~n(|j|<00>r<>q~n|j|<00>r<>Pn|j|<00>}|r<>|j|<00>|j||t|<00>dj<00><00>q~q~|jsd |_n d
|_|r ||<00>n)|r9|jj|<00>n|jd |_Pq~Wd S( s:Read header lines.
Read header lines up to the entirely blank line that terminates them.
The (normally blank) line that ends the headers is skipped, but not
included in the returned list. If a non-header line ends the headers,
(which is an error), an attempt is made to backspace over it; it is
never included in the returned list.
The variable self.status is set to the empty string if all went well,
otherwise it is an error message. The variable self.headers is a
completely uninterpreted list of lines contained in the header (so
printing them will reproduce the header exactly as it appears in the
file).
If multiple header fields with the same name occur, they are combined
according to the rules in RFC 2616 sec 4.2:
Appending each subsequent field-value to the first, each separated
by a comma. The order in which header fields with the same field-name
are received is significant to the interpretation of the combined
field value.
titunreadis header linesEOF in headerssFrom s s
No headerss%Non-header line where header expecteds
; bad seekN(R"tunixfromtheaderststatusR$thasattrtfpR/tseekablettelltTruetIOErrortreadlinet_MAXLINEtlent LineTooLongt
startswithtappendR-tstript iscommenttislasttisheaderR+tseek(R&thlistt
2014-07-10 23:57:08 +08:00
headerseent firstlinet startoflineR/R6tline((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt readheaders<72>sd        
2014-07-09 18:15:23 +08:00
   $    (t__name__t
2014-07-10 23:57:08 +08:00
__module__R+R-RI(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR!<00>s cBs<>eZddd ed<00>Zd<00>Zd<00>Zd<00>Zd<00>Zd<00>Z d d<00>Z
2014-07-09 18:15:23 +08:00
d<00>Z d <00>Z d
<00>Z d d <00>Zd <00>ZRS(icCs<>|r|jd<00>|_n|jdd<00>|_||_||_||_d|_t|_t|_ t|_
t|_ t|_ t|_ t|_dS(Ntrbi(tmakefileR4t
debugleveltstrictt_methodR$tmsgt_UNKNOWNtversionR2treasontchunkedt
chunk_lefttlengtht
2014-07-10 23:57:08 +08:00
will_close(R&tsockRNROtmethodt buffering((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt__init__Os          cCs<>|jjtd<17>}t|<00>tkr7td<00><00>n|jdkrXdGt|<00>GHn|smt|<00><00>ny|jdd<00>\}}}WnMt
2014-07-09 18:15:23 +08:00
k
r<>y"|jdd<00>\}}d}Wq<57>t
k
r<>d}q<>XnX|j d<00>s)|j r |j <00>t|<00><00>q)t||j<00>|_d Sny7t|<00>}|d
ksP|d kr_t|<00><00>nWnt
k
rt|<00><00>nX|||fS( Nis header lineisreply:iR.sHTTP/sHTTP/0.9i<EFBFBD>idi<>(sHTTP/0.9i<EFBFBD>R.(R4R9R:R;R<RNtreprRtsplitR$t
2014-07-10 23:57:08 +08:00
ValueErrorR=ROtclosetLineAndFileWrappertint(R&RHRSR2RT((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt _read_statusks8 
2014-07-09 18:15:23 +08:00
  
2014-07-10 23:57:08 +08:00
  c
Cs |jdk rdSx<53>tr<>|j<00>\}}}|tkrAPnxrtr<>|jjtd<17>}t|<00>tkr<>t d<00><00>n|j
2014-07-09 18:15:23 +08:00
<00>}|s<>Pn|j dkrDdG|GHqDqDWqW||_ |j
<00>|_ |dkr<>d|_n?|jd<00>rd|_n$|d krd
|_n t|<00><00>|jd
krid|_d|_d|_tt<00><00>|_dSt|jd<00>|_|j dkr<>x|jjD]}dG|Gq<47>Wnd|j_|jjd <00>}|r<>|j<00>d kr<>d|_d|_n d|_|j<00>|_|jjd <00>}|r<>|j r<>yt|<00>|_Wntk
rcd|_q<>X|jdkr<>d|_q<>n d|_|tks<>|tks<>d|ko<>dkns<>|jdkr<>d|_n|j r |j r |jdkr d|_ndS(Nis header lineisheader:sHTTP/1.0i
sHTTP/1.i sHTTP/0.9i stransfer-encodingRUscontent-lengthidi<>tHEAD( RQR$R7RctCONTINUER4R9R:R;R<R?RNR2RTRSR=R
RWRURXR!RR1t getheadertlowerRVt _check_closeRbR_t
2014-07-10 23:57:08 +08:00
NO_CONTENTt NOT_MODIFIEDRP(R&RSR2RTtskipthdrttr_encRW((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pytbegin<69>st                      
2014-07-09 18:15:23 +08:00

2014-07-10 23:57:08 +08:00
cCs<>|jjd<00>}|jdkrS|jjd<00>}|rOd|j<00>krOtStS|jjd<00>ritS|r<>d|j<00>kr<>tS|jjd<00>}|r<>d|j<00>kr<>tStS(Nt
2014-07-09 18:15:23 +08:00
connectioni R`s
2014-07-10 23:57:08 +08:00
keep-alivesproxy-connection(RQRfRSRgR7tFalse(R&tconntpconn((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyRh<00>scCs&|jr"|jj<00>d|_ndS(N(R4R`R$(R&((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR`s  cCs |jdkS(N(R4R$(R&((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pytisclosed scCs[|jdkrdS|jdkr0|j<00>dS|jrF|j|<00>S|dkr<>|jdkrs|jj<00>}n@y|j|j<00>}Wnt k
2014-07-09 18:15:23 +08:00
r<>|j<00><01>nXd|_|j<00>|S|jdk r<>||jkr<>|j}q<>n|jj|<00>}| r|r|j<00>n|jdk rW|jt
|<00>8_|jsW|j<00>qWn|S(NR.Rdi( R4R$RPR`RUt _read_chunkedRWtreadt
2014-07-10 23:57:08 +08:00
_safe_readR R;(R&tamtts((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyRus:
2014-07-09 18:15:23 +08:00
    
 
   cCsC|jtkst<00>|j}g}x<>tr<>|dkr<>|jjtd<17>}t |<00>tkrpt
d<00><00>n|j d<00>}|dkr<>|| }nyt |d<00>}Wn0t k
r<>|j<00>tdj|<00><00><00>nX|dkr<>Pq<50>n|dkr|j|j|<00><00>n<>||krR|j|j|<00><00>|||_dj|<00>S||kr<>|j|j|<00><00>|jd<00>d|_dj|<00>S|j|j|<00><00>||8}|jd<00>d}q'Wx[tr+|jjtd<17>}t |<00>tkrt
d<00><00>n|sPn|d kr<>Pq<50>q<>W|j<00>dj|<00>S(
Nis
chunk sizet;iiR.is trailer lines
2014-07-10 23:57:08 +08:00
(RURRtAssertionErrorRVR7R$R4R9R:R;R<tfindRbR_R`R R%R>Rv(R&RwRVR(RHti((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyRtCsV      
2014-07-09 18:15:23 +08:00
         
 
  
cCsg}xi|dkrq|jjt|t<00><00>}|sQtdj|<00>|<00><00>n|j|<00>|t|<00>8}q Wdj|<00>S(sVRead the number of bytes requested, compensating for partial reads.
Normally, we have a blocking socket, but a read() can be interrupted
by a signal (resulting in a partial read).
Note that we cannot distinguish between EOF and an interrupt when zero
bytes have been read. IncompleteRead() will be raised in this
situation.
This function should be used when <amt> 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.
2014-07-10 23:57:08 +08:00
iR.(R4Rutmint MAXAMOUNTR R%R>R;(R&RwRxtchunk((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyRv}s cCs |jj<00>S(N(R4tfileno(R&((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<79><00>scCs.|jdkrt<00><00>n|jj||<00>S(N(RQR$RRf(R&tnametdefault((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyRf<00>s cCs(|jdkrt<00><00>n|jj<00>S(s&Return list of (header, value) tuples.N(RQR$Rtitems(R&((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt
getheaders<72>s N(RJRKR$RpR\RcRnRhR`RsRuRtRvR<>RfR<>(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyREs
2014-07-09 18:15:23 +08:00
 ' V   - :   cBs<>eZdZdZeZeZdZdZ dZ
dde j dd<00>Zddd<00>Zd<00>Zd<00>Zd<00>Zd <00>Zd
<00>Zd <00>Zd <00>Zdd <00>Zddd<00>Zd<00>Zdd<00>Zdid<00>Zd<00>Zd<00>Zed<00>ZRS(i sHTTP/1.1iicCs<>||_||_d|_g|_d|_t|_d|_d|_ d|_
2014-07-10 23:57:08 +08:00
i|_ |dk rr||_ n|j ||<00>\|_|_tj|_dS(N(ttimeouttsource_addressR$RYt_buffert_HTTPConnection__responset_CS_IDLEt_HTTPConnection__stateRPt _tunnel_hostt _tunnel_portt_tunnel_headersROt _get_hostportthosttporttsockettcreate_connectiont_create_connection(R&R<>R<>ROR<>R<>((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR\<00>s            cCsM|jrtd<00><00>n||_||_|r<||_n |jj<00>dS(sC Set up host and port for HTTP CONNECT tunnelling.
2014-07-09 18:15:23 +08:00
In a connection that uses HTTP Connect tunneling, the host passed to the
constructor is used as proxy server that relays all communication to the
endpoint passed to set_tunnel. This is done by sending a HTTP CONNECT
request to the proxy server when the connection is established.
This method must be called before the HTML connection has been
established.
The headers argument should be a mapping of extra HTTP headers
to send with the CONNECT request.
2014-07-10 23:57:08 +08:00
s.Can't setup tunnel for established connection.N(RYt RuntimeErrorR<72>R<>R<>tclear(R&R<>R<>R1((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt
2014-07-09 18:15:23 +08:00
set_tunnel<65>s    cCs<>|dkr<>|jd<00>}|jd<00>}||kr<>yt||d<1F>}WnItk
2014-07-10 23:57:08 +08:00
r<>||ddkr~|j}q<>td||d<16><00>nX|| }n |j}|r<>|ddkr<>|ddkr<>|dd!}q<>n||fS( Nt:t]iR.snonnumeric port: '%s'it[i<><69><EFBFBD><EFBFBD>(R$trfindRbR_t default_portR(R&R<>R<>R|tj((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<79><00>s      &cCs ||_dS(N(RN(R&tlevel((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pytset_debuglevel<65>sc
2014-07-09 18:15:23 +08:00
CsL|j|j|j<00>\}}|jd||f<16>x4|jj<00>D]#\}}|jd||f<16>qEW|jd<00>|j|jd|jd|j <00>}|j
<00>\}}}|dkr<>|j <00>t j d||j<00>f<16><00>nx[trG|jjtd<17>} t| <00>tkr*td <00><00>n| s4Pn| dkr<>Pq<50>q<>WdS(
NsCONNECT %s:%d HTTP/1.0
s%s: %s
s
RORZi<>sTunnel connection failed: %d %sis header line(R<>R<>R<>tsendR<64>t iteritemstresponse_classRYRORPRcR`R<>RR?R7R4R9R:R;R<(
2014-07-10 23:57:08 +08:00
R&R<>R<>theaderR(tresponseRStcodetmessageRH((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt_tunnel<65>s(   
   cCsD|j|j|jf|j|j<00>|_|jr@|j<00>ndS(s3Connect to the host and port specified in __init__.N(R<>R<>R<>R<>R<>RYR<>R<>(R&((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pytconnects cCsQ|jr"|jj<00>d|_n|jrD|jj<00>d|_nt|_dS(s(Close the connection to the HTTP server.N(RYR`R$R<>R<>R<>(R&((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR`s      cCs<>|jdkr1|jr%|j<00>q1t<00><00>n|jdkrRdGt|<00>GHnd}t|d<00>r<>t|t <00> r<>|jdkr<>dGHn|j
2014-07-09 18:15:23 +08:00
|<00>}x<|r<>|jj |<00>|j
|<00>}q<>Wn|jj |<00>dS(sSend `data' to the server.issend:i RussendIng a read()ableN( RYR$t auto_openR<6E>R RNR]R3t
2014-07-10 23:57:08 +08:00
isinstanceRRutsendall(R&tdatat blocksizet datablock((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<79>"s    cCs|jj|<00>dS(suAdd a line of output to the current request buffer.
2014-07-09 18:15:23 +08:00
Assumes that the line does *not* end with \r\n.
2014-07-10 23:57:08 +08:00
N(R<>R>(R&Rx((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt_output6scCsx|jjd<00>dj|j<00>}|j2t|t<00>rK||7}d}n|j|<00>|dk rt|j|<00>ndS(s<>Send the currently buffered request and clear the buffer.
2014-07-09 18:15:23 +08:00
Appends an extra \r\n to the buffer.
A message_body may be specified, to be appended to the request.
R.s
2014-07-10 23:57:08 +08:00
N(R.R.(R<>textendR%R<>tstrR$R<>(R&t message_bodyRQ((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt _send_output=s
   c Cs|jr$|jj<00>r$d|_n|jtkr?t|_n t<00><00>||_|s`d}nd|||jf}|j |<00>|j
2014-07-09 18:15:23 +08:00
dkr|s<>d}|j d<00>r<>t |<00>\}}}}}n|ry|j d<00>}Wn tk
r|j d<00>}nX|jd|<00>q<>|jr8|j} |j}
n|j} |j}
y| j d<00>} Wn tk
r| j d<00>} nX| jd <00>d
kr<>d | d } n|
|jkr<>|jd| <00>q<>|jdd | |
f<16>n|s|jdd<00>qndS(s`Send 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
t/s%s %s %si R.thttptasciitidnatHostR<74>iR<>R<>s%s:%ssAccept-EncodingtidentityN(R<>RsR$R<>R<>t_CS_REQ_STARTEDRRPt _http_vsn_strR<72>t _http_vsnR=RtencodetUnicodeEncodeErrort putheaderR<72>R<>R<>R<>R{R<>( R&RZturlt skip_hosttskip_accept_encodingRltnetloctnilt
2014-07-10 23:57:08 +08:00
netloc_encR<63>R<>thost_enc((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt
2014-07-09 18:15:23 +08:00
putrequestRsL              
 cGs^|jtkrt<00><00>nd|djg|D]}t|<00>^q.<00>f}|j|<00>dS(skSend a request header line to the server.
For example: h.putheader('Accept', 'text/html')
s%s: %ss
2014-07-10 23:57:08 +08:00
N(R<>R<>RR%R<>R<>(R&R<>tvaluestvRl((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<79><00>s 2cCs5|jtkrt|_n t<00><00>|j|<00>dS(s<>Indicate that the last header line has been sent to the server.
2014-07-09 18:15:23 +08:00
This method sends the request to the server. The optional
message_body argument can be used to pass a message body
associated with the request. The message body will be sent in
the same packet as the message headers if it is string, otherwise it is
sent as a separate packet.
2014-07-10 23:57:08 +08:00
N(R<>R<>t _CS_REQ_SENTRR<>(R&R<>((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt
endheaders<72>s   cCs|j||||<00>dS(s&Send a complete request to the server.N(t _send_request(R&RZR<>tbodyR1((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pytrequest<73>scCs<>d}ytt|<00><00>}Wnftk
2014-07-09 18:15:23 +08:00
r<>}y"ttj|j<00><00>j<00>}Wq<57>tt fk
r<>|j
2014-07-10 23:57:08 +08:00
dkr<>dGHq<48>q<>XnX|dk r<>|j d|<00>ndS(Nis Cannot stat!!sContent-Length( R$R<>R;t TypeErrortostfstatR<74>tst_sizetAttributeErrortOSErrorRNR<>(R&R<>tthelentte((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt_set_content_length<74>s" c
Cs<>tjg|D]}|j<00>^q <00>}i}d|krGd|d<nd|kr`d|d<n|j|||<00>|dk r<>d|kr<>|j|<00>nx*|j<00>D]\}} |j|| <00>q<>W|j|<00>dS(NR<4E>iR<>saccept-encodingR<67>scontent-length( R"tfromkeysRgR<>R$R<>R<>R<>R<>(
R&RZR<>R<>R1tkt header_namestskipsRlR(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<79><00>s(    cCs|jr$|jj<00>r$d|_n|jtks<|jrHt<00><00>n|jf}i|jd6|jd6}|j dkr<>||j f7}n|r<>t
|d<n|j ||<00>}|j <00>|j tks<>t<00>t|_|j r<>|j<00>n ||_|S(s!Get the response from the server.RORZiR[N(R<>RsR$R<>R<>RRYRORPRNR7R<>RnRXRRRzR<>R`(R&R[targstkwdsR<73>((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt getresponses$    
    N( RJRKR<>R<>RR<>t HTTP_PORTR<54>R<>RNROR$R<>t_GLOBAL_DEFAULT_TIMEOUTR\R<>R<>R<>R<>R<>R`R<>R<>R<>R<>R<>R<>R<>R<>R<>RpR<>(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<00>s2    
2014-07-09 18:15:23 +08:00
  u   cBsneZdZdZdZdZeZdd d d<00>Z d<00>Z
d d d<00>Z d<00>Z e d <00>Zd
<00>ZRS( s-Compatibility class with httplib.py from 1.5.i
2014-07-10 23:57:08 +08:00
sHTTP/1.0iR.cCs5|dkrd}n|j|j|||<00><00>dS(s:Provide a default host, since the superclass requires one.iN(R$t_setupt_connection_class(R&R<>R<>RO((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR\Cs  cCsj||_|j|_|j|_|j|_|j|_|j|_|j|_|j|_d|_ dS(N(
t_connR<6E>R<>R<>R<>R<>R<>R<>R$tfile(R&Rq((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<79>Os        cCs3|dk r"|jj||<00>n|jj<00>dS(sDAccept arguments to set the host/port, since the superclass doesn't.N(R$R<>t _set_hostportR<74>(R&R<>R<>((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<79>^s cCs|jS(sCProvide a getfile, since the superclass' does not use this concept.(R<>(R&((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pytgetfileescCs<>y.|s|jj<00>}n|jj|<00>}WnNtk
2014-07-09 18:15:23 +08:00
r~}|jjjdd<00>|_|j<00>d|_d|j dfSX|j
|_|j |_|j |j |j
fS(sCompat definition since superclass does not define it.
Returns a tuple consisting of:
- server status code (e.g. '200' if all goes well)
- server "reason" corresponding to status code
- any RFC822 headers in the response from the server
2014-07-10 23:57:08 +08:00
RLii<><69><EFBFBD><EFBFBD>N(R<>R<>RRYRMR<>R`R$R1RHRQR4R2RT(R&R[R<>te((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pytgetreplyis
   cCs|jj<00>d|_dS(N(R<>R`R$R<>(R&((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR`<00>s N(RJRKt__doc__R<5F>R<>RNRR<>R$R\R<>R<>R<>RpR<>R`(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR9s   !tHTTPSConnectioncBs;eZdZeZddddejdd<00>Zd<00>Z RS(s(This class allows communication via SSL.cCs2tj||||||<00>||_||_dS(N(RR\tkey_filet cert_file(R&R<>R<>R<>R<>ROR<>R<>((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR\<00>s cCsh|j|j|jf|j|j<00>}|jrF||_|j<00>ntj ||j
|j <00>|_dS(s(Connect to a host on a given (SSL) port.N( R<>R<>R<>R<>R<>R<>RYR<>tsslt wrap_socketR<74>R<>(R&RY((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<79><00>s    N(
2014-07-09 18:15:23 +08:00
RJRKR<>t
2014-07-10 23:57:08 +08:00
HTTPS_PORTR<54>R$R<>R<>R\R<>(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<79><00>s    tHTTPScBs,eZdZeZdddddd<00>ZRS(s<>Compatibility with 1.5 httplib interface
2014-07-09 18:15:23 +08:00
Python 1.5.2 did not have an HTTPS class, but it defined an
interface for sending http requests that is also useful for
https.
2014-07-10 23:57:08 +08:00
R.cCsM|dkrd}n|j|j|||||<00><00>||_||_dS(Ni(R$R<>R<>R<>R<>(R&R<>R<>R<>R<>RO((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR\<00>s     N(RJRKR<>R<>R<>R$R\(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<79><00>s cCstjddtdd<00>|S(Ns0FakeSocket is deprecated, and won't be in 3.x. s5Use the result of ssl.wrap_socket() directly instead.t
stackleveli(twarningstwarntDeprecationWarning(RYtsslobj((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt
FakeSocket<65>s  cBseZRS((RJRK(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<00>scBseZRS((RJRK(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR <00>scBseZRS((RJRK(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<00>scBseZd<00>ZRS(cCs|f|_||_dS(N(R<>RS(R&RS((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR\<00>s (RJRKR\(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR
<00>scBseZRS((RJRK(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR <00>scBseZRS((RJRK(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR <00>scBs&eZdd<00>Zd<00>Zd<00>ZRS(cCs"|f|_||_||_dS(N(R<>tpartialtexpected(R&R<>R<>((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR\<00>s  cCs<|jdk rd|j}nd}dt|j<00>|fS(Ns, %i more expectedR.sIncompleteRead(%i bytes read%s)(R<>R$R;R<>(R&R<>((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt__repr__<5F>scCs
t|<00>S(N(R](R&((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt__str__<5F>sN(RJRKR$R\R<>R<>(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR <00>s  cBseZRS((RJRK(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<00>scBseZRS((RJRK(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<00>scBseZRS((RJRK(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<00>scBseZRS((RJRK(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyRscBseZd<00>ZRS(cCs.|st|<00>}n|f|_||_dS(N(R]R<>RH(R&RH((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR\s (RJRKR\(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyRsR<cBseZd<00>ZRS(cCstj|dt|f<16>dS(Ns&got more than %d bytes when reading %s(RR\R:(R&t line_type((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR\ s (RJRKR\(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR<
2014-07-09 18:15:23 +08:00
sRacBsJeZdZd<00>Zd<00>Zd<00>Zdd<00>Zd<00>Zdd<00>Z RS(s2A limited file-like object for HTTP/0.9 responses.cCs7||_||_d|_d|_t|<00>|_dS(Ni(t_linet_filet_line_consumedt _line_offsetR;t
2014-07-10 23:57:08 +08:00
_line_left(R&RHR<>((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR\s
    cCst|j|<00>S(N(tgetattrR<72>(R&tattr((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt __getattr__!scCs:d|_|jj|_|jj|_|jj|_dS(Ni(R<>R<>RuR9t readlines(R&((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt_done$s cCs|jr|jj|<00>S|js(t<00>|dksC||jkr<>|j|j}|j<00>|dkrz||jj<00>S||jj|t |<00><18>Snp||jks<>t<00>|j}||}|j||!}||_|j|8_|jdkr|j<00>n|SdS(Ni(
R<>R<>RuR<>RzR$R<>R<>RR;(R&RwRxR|R<>((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyRu-s$ 
2014-07-09 18:15:23 +08:00
 ! 
2014-07-10 23:57:08 +08:00
  cCsC|jr|jj<00>S|js%t<00>|j|j}|j<00>|S(N(R<>R<>R9R<>RzR<>R<>R(R&Rx((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyR9Cs   
cCsz|jr|jj|<00>S|js(t<00>|j|jg}|j<00>|dkrb||jj<00>S||jj|<00>SdS(N( R<>R<>RR<>RzR<>R<>RR$(R&tsizetL((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyRKs 
2014-07-09 18:15:23 +08:00
 N(
2014-07-10 23:57:08 +08:00
RJRKR<>R\RRR$RuR9R(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyRas    (eR<>RR<>R<>tsysRturlparseRR<>tcatch_warningstfilterwarningsR<73>t mimetoolst cStringIORt ImportErrort__all__R<5F>R<>RRR<>R<>R<>RetSWITCHING_PROTOCOLSt
2014-07-09 18:15:23 +08:00
PROCESSINGRtCREATEDtACCEPTEDtNON_AUTHORITATIVE_INFORMATIONRit RESET_CONTENTtPARTIAL_CONTENTt MULTI_STATUStIM_USEDtMULTIPLE_CHOICEStMOVED_PERMANENTLYtFOUNDt SEE_OTHERRjt USE_PROXYtTEMPORARY_REDIRECTt BAD_REQUESTt UNAUTHORIZEDtPAYMENT_REQUIREDt FORBIDDENt NOT_FOUNDtMETHOD_NOT_ALLOWEDtNOT_ACCEPTABLEtPROXY_AUTHENTICATION_REQUIREDtREQUEST_TIMEOUTtCONFLICTtGONEtLENGTH_REQUIREDtPRECONDITION_FAILEDtREQUEST_ENTITY_TOO_LARGEtREQUEST_URI_TOO_LONGtUNSUPPORTED_MEDIA_TYPEtREQUESTED_RANGE_NOT_SATISFIABLEtEXPECTATION_FAILEDtUNPROCESSABLE_ENTITYtLOCKEDtFAILED_DEPENDENCYtUPGRADE_REQUIREDtINTERNAL_SERVER_ERRORtNOT_IMPLEMENTEDt BAD_GATEWAYtSERVICE_UNAVAILABLEtGATEWAY_TIMEOUTtHTTP_VERSION_NOT_SUPPORTEDtINSUFFICIENT_STORAGEt NOT_EXTENDEDRR~R:tMessageR!RRRR<>R<>R>R<>R<>t ExceptionRR RR
2014-07-10 23:57:08 +08:00
R R R RRRRRR<RRa(((s<e:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\httplib.pyt<module>Cs*     
2014-07-09 18:15:23 +08:00
     
k<13>d<13><00>[