/usr/lib/python2.6/site-packages/supervisor
NameSizeModeActions
medusa/-0755rm
ui/-0755rm
datatypes.py66410644editdlrm
datatypes.pyc90950644editdlrm
datatypes.pyo90470644editdlrm
http.py265330644editdlrm
http.pyc227660644editdlrm
http.pyo227660644editdlrm
http_client.py62910644editdlrm
http_client.pyc87590644editdlrm
http_client.pyo86800644editdlrm
options.py554490644editdlrm
options.pyc494110644editdlrm
options.pyo494110644editdlrm
pidproxy.py17970644editdlrm
pidproxy.pyc26580644editdlrm
pidproxy.pyo26580644editdlrm
supervisorctl.py214970644editdlrm
supervisorctl.pyc200430644editdlrm
supervisorctl.pyo200430644editdlrm
supervisord.py274900644editdlrm
supervisord.pyc221170644editdlrm
supervisord.pyo220040644editdlrm
test.py1175440644editdlrm
test.pyc1172160644editdlrm
test.pyo1172160644editdlrm
web.py175630644editdlrm
web.pyc150220644editdlrm
web.pyo150220644editdlrm
xmlrpc.py326580644editdlrm
xmlrpc.pyc276600644editdlrm
xmlrpc.pyo275420644editdlrm
__init__.py80644editdlrm
__init__.pyc1420644editdlrm
__init__.pyo1420644editdlrm
Edit: /usr/lib/python2.6/site-packages/supervisor/http.pyc (22766B)
FATc@sddklZddklZddklZddklZddkZddkZddkZddkZddk Z ddk Z ddk Z ddk Z ddk Z ddkZgZdddYZdd d YZd d!d YZd d"d YZdeifdYZdeifdYZdeifdYZdefdYZdefdYZdd#dYZdd$dYZdd%dYZdZdS(&i(t http_date(t http_server(t producers(tfilesysNtdeferring_chunked_producercBs#eZdZddZdZRS(s'A producer that implements the 'chunked' transfer coding for HTTP/1.1. Here is a sample usage: request['Transfer-Encoding'] = 'chunked' request.push ( producers.chunked_producer (your_producer) ) request.done() cCs||_||_d|_dS(Ng?(tproducertfooterstdelay(tselfRR((s3/usr/lib/python2.6/site-packages/supervisor/http.pyt__init__s  cCs|iow|ii}|tjotS|odt||fSd|_|iotidg|iddSdSndSdS(Ns%x %s t0s s s0 t(Rtmoret NOT_DONE_YETtlentNoneRtstringtjoin(Rtdata((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR !s     N(t__name__t __module__t__doc__RR R (((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRs tdeferring_composite_producercBs eZdZdZdZRS(s$combine a fifo of producers into onecCs||_d|_dS(Ng?(RR(RR((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR 6s cCsgx`t|ioK|id}|i}|tjotS|o|S|iidqWdSdS(NiR (RRR R tpop(Rtptd((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR :s   (RRRR R (((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR4s tdeferring_globbing_producercBs#eZdZddZdZRS(s 'glob' the output from a producer into a particular buffer size. helps reduce the number of calls to send(). [this appears to gain about 30% performance on requests to a single channel] iicCs(||_d|_||_d|_dS(NR g?(Rtbuffert buffer_sizeR(RRR((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR Os   cCstx[t|i|ijoA|ii}|tjotS|o|i||_qPqW|i}d|_|S(NR (RRRRR R (RRtr((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR Us   i(RRRR R (((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRHs tdeferring_hooked_producercBs eZdZdZdZRS(s A producer that will call when it empties,. with an argument of the number of bytes produced. Useful for logging/instrumentation purposes. cCs(||_||_d|_d|_dS(Nig?(RtfunctiontbytesR(RRR((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR js   cCsr|io`|ii}|tjotS|pd|_|i|in|it||_|SdSdS(NR (RR R RRR R(Rtresult((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR ps   (RRRR R (((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRcs tdeferring_http_requestcBs2eZdZdZdZdZdZRS(s The medusa http_request class uses the default set of producers in medusa.prodcers. We can't use these because they don't know anything about deferred responses, so we override various methods here. This was added to support tail -f like behavior on the logtail handler c Ostititi|i}d}d}d}|idjo?|djo(|idp d}q~d|dR1RsR(((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR"s  T  2tdeferring_http_channelcBsAeZdZeZeiZeidZdZdZ RS(icCs\|}|io9|i}||_||}||ijotStSntii|S(N(Rtwritable_checktTruetFalseRt http_channeltwritable(Rtttnowtlast_writable_checktelapsed((s3/usr/lib/python2.6/site-packages/supervisor/http.pyREs     cCsxt|io|ii}|djo*|ip|ii|indSt|to"|ii|i||_dS|i }|t jo|i |_ dS|o|i||_dS|iiqdSqdS(s Implement deferreds N( Rt producer_fifotfirstRt ac_out_bufferRR$t isinstanceRbR R R(RRR((s3/usr/lib/python2.6/site-packages/supervisor/http.pyt refill_bufferSs*       cCsD|io|iin&|i}d|_ti|d}x"|o|d o|d}qBW|p|idS|d}ti|\}}}ti|d}ti |\}}d|jo5|oti |d|}qti |}nt ||||||} |i i |iii |djo,|idt|d | id dSx|iiD]} | i| oy| |_| i| Wns|iii ti\\} } } }}}|id ||| | fd y| id Wq*q*XnXdSqW| id dS(s We only override this to use 'deferring_http_request' class instead of the normal http_request class; it sucks to need to override this R s iiNRMt?sBad HTTP request: %sterroris'Server Error: %s, %s: file: %s line: %sii(R4tfound_terminatort in_bufferRRhR5Rt crack_requestt join_headerst splitqueryR_R"trequest_countert incrementRAttotal_requestsRtlog_infotreprRthandlerstmatchthandle_requestt exceptionstasyncoretcompact_traceback(RR)tlinesRER`turiR*trpathtrqueryRthtfiletfuntlineRtvttbinfo((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRrs\            ! ( RRtac_out_buffer_sizeRRRDRRRR(((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR<s   tsupervisor_http_servercBs2eZeZdZdZdZddZRS(cCsddkl}|p|iti}n|i|}||_tii||i |g|_ |i d|i dS(sj Override __init__ to do logger setup earlier so it can go to our logger object instead of stdout i(RBiN( tmedusaRBt file_loggertsyststdouttunresolving_loggerRt dispatcherR t set_socketRt setblockingtset_reuse_addr(Rtsockt logger_objectRB((s3/usr/lib/python2.6/site-packages/supervisor/http.pytprebinds    cCsddkl}ddkl}|id||_||_||_||_||_ |i d|t i t i |i |ifdS(Ni(tcounter(tVERSION_STRINGis2Medusa (V%s) started at %s Hostname: %s Port:%s (tmedusa.counterRtmedusa.http_serverRtlistent total_clientsRRt bytes_outtbytes_inRRDtctimeRcRH(RRR((s3/usr/lib/python2.6/site-packages/supervisor/http.pytpostbinds      tinfocCsCd}t|dddj o |i}n|ii||dS(NR tip(tgetattrRRRBR1(RtmessagettypeR((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRs N( RRRt channel_classRRRRR(((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRs   tsupervisor_af_inet_http_servercBseZdZdZRS(s+ AF_INET version of supervisor HTTP server cCs||_||_tititi}|i|||i||f|ii\}}|p)|iddti ti }nyti |d|_ Wn/ti j o |idd||_ nX|idS(NsComputing default hostnametwarningisCannot do reverse lookup(RRHtsockettAF_INETt SOCK_STREAMRtbindt getsocknameRt gethostbynamet gethostnamet gethostbyaddrRcRR(RRRHRRRG((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR s  (RRRR (((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRstsupervisor_af_unix_http_servercBs eZdZdZdZRS(s+ AF_UNIX version of supervisor HTTP server c Cs||_||_d|tif}yti|Wntij onXxtititi}zg|i |ti ||yti ||Wntij o|i |}|otit ind|}tii|yti|WnnX|itidwUnXyti||d|dWnktij o\} | dt ijo<d}t||t|titidfqnX|i||PWdyti|Wntij onXXqUd|_|idS(Ns%s.%dsUnlinking stale socket %s g333333?iisNot permitted to chown %s to uid/gid %s; adjust "sockchown" value in config file or on command line to values that the current user (%s) can successfully chowns(RRHR\tgetpidtunlinkRRtAF_UNIXRRtchmodtlinkt checkusedterrnot EADDRINUSERtstderrtwriteR$RDtsleeptchowntEPERMt ValueErrorRtpwdtgetpwuidtgeteuidRRcR( Rt socketnamet sockchmodt sockchownRttempnameRtusedtmsgtwhy((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR sZ          cCsqtititi}y7|i||id|id}|iWntij otSXt SdS(NsGET / HTTP/1.0 i( RRRtconnecttsendtrecvR$RRR(RRtsR((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRTs  (RRRR R(((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR s Gttail_f_producercBs#eZdZdZdZRS(cCs[t|d|_||_d|_|i}||jo|||_n d|_dS(Ntrbg?i(topenRRERtfsizetsz(RREtfilenametheadR((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR as    cCsy|i}Wntj odSX||i}|djod|_dS|djo4|ii| d|ii|}||_|StS(NR is==> File truncated <== i(RtOSErrorRRtseektreadR (Rtnewszt bytes_addedR ((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR ks     cCsti|iitiS(N(R\tfstatRtfilenotstattST_SIZE(R((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR|s(RRR R R(((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR`s tlogtail_handlercBs/eZdZdZdZdZdZRS(sLogtail HTTP Request Handlers/logtailcCs ||_dS(N(t supervisord(RR((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR scCs2|i\}}}}|t|i |ijS(N(R^RRf(RRERfRnRoRp((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRsc Csi|idjo|iddS|i\}}}}d|joti|}nx'|o|ddjo|d}q]W|idd\}}|iii|}|djo|iddS|i i }|djpt i i| o|iddSt i|ti} ti| |d ( RRERfRnRoRpt processNametprocessR tmtime((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRs.     !  (RRtIDENTRfR RR(((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRs   tmainlogtail_handlercBs/eZdZdZdZdZdZRS(s!Main Logtail HTTP Request Handlers /mainlogtailcCs ||_dS(N(R(RR((s3/usr/lib/python2.6/site-packages/supervisor/http.pyR scCs2|i\}}}}|t|i |ijS(N(R^RRf(RRERfRnRoRp((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRscCs|idjo|iddS|iii}|djptii| o|iddSti |t i }t i ||d(RRER R((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRs !  (RRRRfR RR(((s3/usr/lib/python2.6/site-packages/supervisor/http.pyRs   cs%ipdSi}i}dd fdY}|}ii}|tijo+ii\}}t||d|} n[|tijo:ii} i } i } t | | | d|} nt d|ddk l} ddkl}| |}t|}t|}tiitiit}tii|d}ti|}|||}|o]h||6}dd kl}|||}|||}|||}|||}niid | i|| i|| i|| i|| S( Nt LogWrappercseZfdZRS(cs2|ido|d }nii|dS(Ns i(tendswithRBR(RR(R(s3/usr/lib/python2.6/site-packages/supervisor/http.pyR1s(RRR1((R(s3/usr/lib/python2.6/site-packages/supervisor/http.pyRsRsCannot determine socket type %ri(tsupervisor_xmlrpc_handler(tsupervisor_ui_handlertui(t auth_handlers0Running without any HTTP authentication checking(( t http_portt http_usernamet http_passwordtfamilyRRtaddressRRRRRRtxmlrpcRtwebRRRR\Rftabspathtdirnamet__file__RRt os_filesystemtmedusa.auth_handlerRRBtcriticaltinstall_handler(RRtusernametpasswordRtwrapperRRGRHthsRRRRRt xmlrpchandlert tailhandlertmaintailhandlertheret templatedirt filesystemt uihandlertusersR((Rs3/usr/lib/python2.6/site-packages/supervisor/http.pytmake_http_serversN                 ((((((((RRRRRRR\RRDRRRRRR~R RRRRt http_requestR"RRRRRRRRR6(((s3/usr/lib/python2.6/site-packages/supervisor/http.pyts6          "5V3