ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ A[c @`sQddlmZmZmZmZddlmZmZddlm Z ddl Z ddl Z ddl Z ddl Z ddlZddlmZddlmZmZmZddlmZejdZe jjeZejZe jj ed Z!d efd YZ"d efd YZ#defdYZ$dej%fdYZ&e!eddZ(e)dkrMddl*Z*e*j+ddZ,e,j-ddde.dddde,j-dddd de/d!d"dd#e,j-d$d%dd&de0d!d'dd(e,j-d)dd*ded!d+dd,e,j-d-dd.ded!d+dd/e,j1Z2e2j3e_3e2j4r|e$Z5n0e#Z5e j6re j7e5_8ne j9e5_8e j:e j;Z<e<j=e!e2j>re<j?e2j>ne2j@re<jAe2j@ne"d0e2jBfe5e<ZCe2j3r=eDd1jEe2neCjFd2ndS(3i(tabsolute_importtdivisiontprint_functiontunicode_literals(tfiltertstr(tutilsN(tparse(t HTTPServertSimpleHTTPRequestHandlertBaseHTTPRequestHandler(tsupportu threadingu keycert.pemt HTTPSServercB`s#eZdZdZdZRS(cC`s tj|||||_dS(N(t _HTTPServert__init__tcontext(tselftserver_addresst handler_classR((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pyRscC`sd|jj|j|jfS(Nu <%s %s:%s>(t __class__t__name__t server_namet server_port(R((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pyt__str__s cC`swy1|jj\}}|jj|dt}Wn9tjk rl}tjrftj j d|nnX||fS(Nt server_sideuGot an error: %s ( tsockettacceptRt wrap_sockettTrueterrorR tverbosetsyststderrtwrite(Rtsocktaddrtsslconnte((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pyt get_request"s (Rt __module__RRR&(((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pyR s  tRootedHTTPRequestHandlercB`s,eZdZeZdZdZdZRS(u TestHTTPS/1.0icC`stjj|d}tjjtjj|}|jd}td|}|j }xS|D]K}tjj |\}}tjj|\}}tjj ||}qbW|S(uTranslate a /-separated PATH to the local filename syntax. Components that mean special things to the local file system (e.g. drive or directory names) are ignored. (XXX They should probably be diagnosed.) iu/N( turllibRturlparsetostpathtnormpathtunquotetsplitRtNonetroott splitdrivetjoin(RR,twordstwordtdrivethead((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pyttranslate_path8s   cG`sRtjrNtjjd|jj|jj|jj |j ||fndS(Nu server (%s:%d %s): [%s] %s ( R RRtstdoutR!tserverRRtrequesttciphertlog_date_time_string(Rtformattargs((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pyt log_messageLs      (RR'tserver_versionthereR1ttimeoutR8R@(((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pyR(.s  tStatsRequestHandlercB`s2eZdZdZedZdZdZRS(uSExample HTTP request handler which returns SSL statistics on GET requests. uStatsHTTPS/1.0cC`s|jjj}|j}i|jd6|jd6|jd6}tj|}|j d}|j d|j dd|j dt t ||j|r|jj|nd S( uServe a GET request.u session_cacheucipheru compressionuutf-8iu Content-typeutext/plain; charset=utf-8uContent-LengthN(trfiletrawt_sockRt session_statsR<t compressiontpprinttpformattencodet send_responset send_headerRtlent end_headerstwfileR!(Rt send_bodyR"Rtstatstbody((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pytdo_GET^s     cC`s|jdtdS(uServe a HEAD request.RRN(RUtFalse(R((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pytdo_HEADpscG`s#tjrtj|||ndS(N(R RR t log_request(RR>R?((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pyRXts (RR't__doc__RARRURWRX(((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pyRDWs   tHTTPSServerThreadcB`s>eZeddZdZddZdZdZRS(cC`sVd|_t|df|pt||_|jj|_tjj |t |_ dS(Ni( R0tflagR R(R:Rtportt threadingtThreadRRtdaemon(RRthostR((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pyR{s    cC`sd|jj|jfS(Nu<%s %s>(RRR:(R((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pyRscC`s||_tjj|dS(N(R[R]R^tstart(RR[((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pyRas cC`sB|jr|jjnz|jjdWd|jjXdS(Ng?(R[tsetR:t serve_forevert server_close(R((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pytruns  cC`s|jjdS(N(R:tshutdown(R((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pytstopsN( RR'tHOSTR0RRRaReRg(((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pyRZys    c`sttjtj}|j|t|||tj}j||jfd}|j |S(Nc`sPtjrtjjdnjtjrBtjjdnjdS(Nustopping HTTPS server ujoining HTTPS thread (R RRR9R!RgR3((R:(sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pytcleanups    ( tsslt SSLContexttPROTOCOL_SSLv23tload_cert_chainRZR]tEventRatwaitt addCleanup(tcasetcertfileR`RRR[Ri((R:sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pytmake_https_servers     u__main__t descriptionuERun a test HTTPS server. By default, the current directory is served.u-pu--portttypetdefaultiQthelpu(port to listen on (default: %(default)s)u-qu--quiettdestuverbosetactionu store_falseube less verboseu-su--statsuuse_stats_handleru store_trueualways return stats pageu --curve-nameu curve_nameustoreu&curve name for EC-based Diffie-Hellmanu--dhudh_fileu!PEM file containing DH parametersuu'Listening on https://localhost:{0.port}g?(Gt __future__RRRRtfuture.builtinsRRtfutureRR+RRjRJRtfuture.backports.urllibRt urllib_parsetfuture.backports.http.serverRR R R tfuture.backports.testR t import_moduleR]R,tdirnamet__file__RBRhR3tCERTFILER R(RDR^RZR0RsRtargparsetArgumentParsertparsert add_argumenttintRRVt parse_argsR?Rtuse_stats_handlerRtPY2tgetcwduR1tgetcwdRktPROTOCOL_TLSv1RRmt curve_nametset_ecdh_curvetdh_filetload_dh_paramsR\R:tprintR>Rc(((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/ssl_servers.pytsh"      )"