��Qc@sEddlZddlZddlmZddlmZd�ZdS(i�N(tutil(tcommoncs�tjtj�tjtj�ttjj��}|j dd�|j
dd�jd�r�|d}|dj|�r�|dt|�|d<q�ntj}|j
dd�j
�dkr�tj|tjj�}n||d<tj|d <d|d<t|d
<t|d<t|d<|j
dd�j
�dkrGd|d<n
d|d<g�g�tj����fd��d���fd�}|||�}z2x|D]}�|�q�W�s��d�nWdt|dd���XdS(Nt PATH_INFOttSERVER_SOFTWAREs
Microsoft-IIStSCRIPT_NAMEtHTTP_EXPECTs100-continues
wsgi.inputswsgi.errorsiiswsgi.versionswsgi.multithreadswsgi.multiprocesss
wsgi.run_oncetHTTPStofftont1tyesthttpsswsgi.url_schemethttpcs��std��nZ�so�\}}�(�jd|�x|D]}�jd|�qDW�jd�n�j|��j�dS(Nswrite() before start_response()sStatus: %s
s%s: %s
s
(tAssertionErrortwritetflush(tdatatstatustresponse_headerstheader(theaders_senttheaders_settout(s;/sys/lib/python2.7/site-packages/mercurial/hgweb/wsgicgi.pyR/s
csa|r;z(�r-|d|d|d��nWdd}Xn�rPtd��n||g�(�S(NiiisHeaders already set!(tNoneR(RRtexc_info(RRR(s;/sys/lib/python2.7/site-packages/mercurial/hgweb/wsgicgi.pytstart_response>s"
tclosecSsdS(N(R(((s;/sys/lib/python2.7/site-packages/mercurial/hgweb/wsgicgi.pyt<lambda>Ss(ii(sonR
syes(Rt setbinarytsyststdintstdouttdicttostenviront iteritemst
setdefaulttgett
startswithtlentlowerRtcontinuereaderRtstderrtFalsetTrueRtgetattr(tapplicationR#t
scriptnameRRtcontenttchunk((RRRRs;/sys/lib/python2.7/site-packages/mercurial/hgweb/wsgicgi.pytlaunchs@
(R"Rt mercurialRtmercurial.hgwebRR3(((s;/sys/lib/python2.7/site-packages/mercurial/hgweb/wsgicgi.pyt<module>s
|