Hacked By AnonymousFox
�
�Q�f` � �n � d Z ddlZg d�Z G d� d� Zd� Zd� Zd
d�Zd � Zd
� Zh d�j Z
d� Zy)z$Miscellaneous WSGI-related Utilities� N)�FileWrapper�guess_scheme�application_uri�request_uri�shift_path_info�setup_testing_defaultsc �$ � e Zd ZdZdd�Zd� Zd� Zy)r z1Wrapper to convert file-like objects to iterablesc �\ � || _ || _ t |d� r|j | _ y y )N�close)�filelike�blksize�hasattrr )�selfr r
s �3/opt/alt/python312/lib64/python3.12/wsgiref/util.py�__init__zFileWrapper.__init__ s* � � ��
�����8�G�$�!���D�J� %� c � � | S �N� )r s r �__iter__zFileWrapper.__iter__ s � ��r c �` � | j j | j � }|r|S t �r )r �readr
�
StopIteration)r �datas r �__next__zFileWrapper.__next__ s( � ��}�}�!�!�$�,�,�/����K��r N)i )�__name__�
__module__�__qualname__�__doc__r r r r r r r r s � �;�(��r r c �, � | j d� dv ryy)zMReturn a guess for whether 'wsgi.url_scheme' should be 'http' or 'https'
�HTTPS)�yes�on�1�https�http)�get)�environs r r r s � � �{�{�7��/�/��r c � � | d dz }ddl m} | j d� r || d z
}n7|| d z
}| d dk( r| d d k7 r|d
| d z z
}n| d dk7 r|d
| d z z
}| || j d� xs d
d�� z
}|S )z@Return the application's base URI (no PATH_INFO or QUERY_STRING)�wsgi.url_schemez://r ��quote� HTTP_HOST�SERVER_NAMEr% �SERVER_PORT�443�:�80�SCRIPT_NAME�/�latin1)�encoding)�urllib.parser, r'