403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.141.38.5
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python37/lib64/python3.7/site-packages/aiohttp/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python37/lib64/python3.7/site-packages/aiohttp/__pycache__/web_middlewares.cpython-37.pyc
B

�k�a)�@s�ddlZddlmZmZmZmZmZmZddlm	Z	ddl
mZmZddl
mZddlmZddlmZd	Zer|dd
lmZed�Zeeeeefd�d
d�Zeed�dd�Zeee	geefZddded�eeeeeed�dd�Zded�dd�ZdS)�N)�
TYPE_CHECKING�	Awaitable�Callable�Tuple�Type�TypeVar�)�Handler)�HTTPPermanentRedirect�	_HTTPMove)�Request)�StreamResponse)�SystemRoute)�
middleware�normalize_path_middleware)�Application�_Func)�request�path�returnc�s@|j|d�}|jj�|�IdH}||_|jdkr8d|fSd|fS)N)Zrel_urlTF)�clone�appZrouter�resolveZ_match_infoZhttp_exception)rrZalt_request�
match_info�r�J/opt/alt/python37/lib64/python3.7/site-packages/aiohttp/web_middlewares.py�_check_request_resolvess
r)�frcCs
d|_|S)Nr)Z__middleware_version__)rrrrr!srTF)�append_slash�remove_slash�
merge_slashes�redirect_class)rrr r!rcs:�o�}|std��ttttd�����fdd��}|S)a�Factory for producing a middleware that normalizes the path of a request.

    Normalizing means:
        - Add or remove a trailing slash to the path.
        - Double slashes are replaced by one.

    The middleware returns as soon as it finds a path that resolves
    correctly. The order if both merge and append/remove are enabled is
        1) merge slashes
        2) append/remove slash
        3) both merge slashes and append/remove slash.
    If the path resolves with at least one of those conditions, it will
    redirect to the new path.

    Only one of `append_slash` and `remove_slash` can be enabled. If both
    are `True` the factory will raise an assertion error

    If `append_slash` is `True` the middleware will append a slash when
    needed. If a resource is defined with trailing slash and the request
    comes without it, it will append it automatically.

    If `remove_slash` is `True`, `append_slash` must be `False`. When enabled
    the middleware will remove trailing slashes and redirect if the resource
    is defined

    If merge_slashes is True, merge multiple consecutive slashes in the
    path into one.
    z#Cannot both remove and append slash)r�handlerrc�s4t|jjt��r&g}d|jkr:|j�dd�\}}d|}n
d}|j}�r\|�t�dd|���rz|j	�
d�sz|�|d��r�|j	�
d�r�|�|dd���r��r�|�t�dd|d���r�r�t�dd|�}|�|dd��x@|D]8}t�dd|�}t||�IdH\}}|r�|j|��q�W||�IdHS)N�?r�z//+�/���z^//+)�
isinstancerZrouterZraw_path�split�append�re�subr�endswithr)rr"Zpaths_to_checkr�queryZmerged_slashesZresolves)rr r!rrr�implOs0


z'normalize_path_middleware.<locals>.impl)�AssertionErrorrrr	r
)rrr r!Zcorrect_configurationr.r)rr r!rrr)s
#
rr)rrcsttttd��fdd��}|S)N)rr"rc	�s&|j����||�IdHSQRXdS)N)rZset_current_app)rr")rrrr.rsz&_fix_request_current_app.<locals>.impl)rrr	r
)rr.r)rr�_fix_request_current_appqsr0)r*�typingrrrrrrZtypedefsr	Zweb_exceptionsr
rZweb_requestrZweb_responser
Zweb_urldispatcherr�__all__Zweb_apprr�str�boolrrZ_Middlewarerr0rrrr�<module>s& B

Youez - 2016 - github.com/yon3zu
LinuXploit