PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  aNc@sdZddlZddlZddlZddlmZddlmZdZd e fdYZ dddZ de fdYZ dZ dddZdS(s An application that proxies WSGI requests to a remote server. TODO: * Send ``Via`` header? It's not clear to me this is a Via in the style of a typical proxy. * Other headers or metadata? I put in X-Forwarded-For, but that's it. * Signed data of non-HTTP keys? This would be for things like REMOTE_USER. * Something to indicate what the original URL was? The original host, scheme, and base path. * Rewriting ``Location`` headers? mod_proxy does this. * Rewriting body? (Probably not on this one -- that can be done with a different middleware that wraps this middleware) * Example:: use = egg:Paste#proxy address = http://server3:8680/exist/rest/db/orgs/sch/config/ allowed_request_methods = GET iN(thttpexceptions(tasliststransfer-encodingt connections keep-alivesproxy-authenticatesproxy-authorizationttettrailerstupgradetProxycBs eZdddZdZRS(cCs||_tj||_|jdj|_|jd|_|jd|_g|D]}|rX|j^qX|_g|D]}|r|j^q|_ dS(Niii( taddressturlparseturlsplittparsedtlowertschemethosttpathtallowed_request_methodstsuppress_http_headers(tselfRRRtx((s//usr/lib/python2.7/site-packages/paste/proxy.pyt__init__6s (cCs|jr8|dj|jkr8tjd||S|jdkrStj}n7|jdkrntj}ntd|j |jf||j }i}xs|j D]e\}}|j dr|djj dd }|d ks||jkrqn|||(t __class__RJthextidRORP(R((s//usr/lib/python2.7/site-packages/paste/proxy.pyt__repr__s cCs|d}|jdkr"|}n |j}|dkrCtj}n(|dkr[tj}ntd|d|krtdn|d}|jdkr|}n |j}||}i} xR|jD]D\} } | jdr| dj j d d } | | | |d|d7}n|j|d|| | |j}t|j}d|j|jf}||||jd} | dk r|j t | } n |j } |j| gS(Nswsgi.url_schemeRRsUnknown scheme %rt HTTP_HOSTs*WSGI environ must contain an HTTP_HOST keyRiRRR RtHTTP_X_FORWARDED_FORsx-forwarded-forRs content-typeRs wsgi.inputiRit SCRIPT_NAMERR!R"Rs%s %sscontent-length(ROR:RPR$R%R&R'R(R)R R*R+R/R,R-R.R0R1R3R4R5R6R7R8R9R;(RR<R=R t conn_schemeR>R t conn_hostR?R@RARBRDRCRRGRHR7((s//usr/lib/python2.7/site-packages/paste/proxy.pyRIsn                          N(RJRKt__doc__R:RRTRI(((s//usr/lib/python2.7/site-packages/paste/proxy.pyRNs   cCsg}x|jD]}|s"qn|djr|sKtd|n|j\}}|d|j}|j||fqny|jdd\}}Wntd|nX|j}|jtkr|j||fqqW|S(sB Turn a Message object into a list of WSGI-style headers. is%First header starts with a space (%r)t t:isInvalid header: %r( R@tisspaceR'tpoptstriptappendtsplitR tfiltered_headers(tmessageRHt full_headert last_headert last_valueRBtheader((s//usr/lib/python2.7/site-packages/paste/proxy.pyR5s( RcCstd|d|S(s Create a proxy that connects to a specific host, but does absolutely no other filtering, including the Host header. RORP(RN(RLRORP((s//usr/lib/python2.7/site-packages/paste/proxy.pytmake_transparent_proxys (stransfer-encodingRs keep-alivesproxy-authenticatesproxy-authorizationRRR(RZR$RR0tpasteRtpaste.util.convertersRRbtobjectRRMRNR5R:Rh(((s//usr/lib/python2.7/site-packages/paste/proxy.pyts&   Q \