HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/mercurial/hgweb/__pycache__/wsgicgi.cpython-310.pyc
o

�]Lb��@sPddlmZddlZddlmZddlmZddlmZddlmZd	d
�Z	dS)�)�absolute_importN�)�getattr)�pycompat)�procutil�)�commoncs�t�tj�t�tj�tt�tj��}|�	dd�|�
dd��d�r:|d}|d�|�r:|dt|�d�|d<tj}|�
dd��
�dkrOt�|tjj�}||d<tj|d	<d
|d<d|d
<d|d<d|d<|�
dd��
�dvrwd|d<nd|d<g�g�tj����fdd��d���fdd�	}|||�}z'|D]}�|�q��s��d�Wt|ddd���dSWt|ddd���dSt|ddd���w) N�	PATH_INFO��SERVER_SOFTWAREz
Microsoft-IIS�SCRIPT_NAME�HTTP_EXPECTz100-continuez
wsgi.inputzwsgi.errors)rrzwsgi.versionFzwsgi.multithreadTzwsgi.multiprocessz
wsgi.run_once�HTTPS�off)�on�1�yes�httpszwsgi.url_scheme�httpcs��std���s7�\}}�dd�<��dt�|��|D]\}}��dt�|�t�|�f�q��d���|����dS)Nswrite() before start_response()sStatus: %s
s%s: %s
s
)�AssertionError�writer�bytesurl�flush)�data�status�response_headers�hk�hv)�headers_sent�headers_set�out��9/usr/lib/python3/dist-packages/mercurial/hgweb/wsgicgi.pyr7s��

zlaunch.<locals>.writecsJ|rz�r|d|d|d��W~n~w�rtd��||g�dd�<�S)NrrrsHeaders already set!)r)rr�exc_info)rrrr!r"�start_responseIs�zlaunch.<locals>.start_response��closecSsdS�Nr!r!r!r!r"�<lambda>^szlaunch.<locals>.<lambda>r')r�	setbinary�stdin�stdout�dictr�	iteritems�os�environ�
setdefault�get�
startswith�len�lowerr�continuereaderr�stderrr)�applicationr/�
scriptnamer*r$�content�chunkr!)rrr rr"�launchsD




�*r;)
�
__future__rr.rrr
�utilsrrr;r!r!r!r"�<module>s