Uname: Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.213.251.212
Your Ip: 3.144.224.68
User: allssztx (535) | Group: allssztx (533)
Safe Mode: OFF
Disable Function:
NONE

name : validate.cpython-313.pyc
�

1}g�:��*�SrS/rSSKrSSKrSSKr\R
"S5r\R
"S5r"SS\5r	Sr
S	rS
r"SS5r
"S
S5r"SS5r"SS5r"SS5rSrSrSrSrSrSrSrSrg)a&
Middleware to check for obedience to the WSGI specification.

Some of the things this checks:

* Signature of the application and start_response (including that
  keyword arguments are not used).

* Environment checks:

  - Environment is a dictionary (and not a subclass).

  - That all the required keys are in the environment: REQUEST_METHOD,
    SERVER_NAME, SERVER_PORT, wsgi.version, wsgi.input, wsgi.errors,
    wsgi.multithread, wsgi.multiprocess, wsgi.run_once

  - That HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH are not in the
    environment (these headers should appear as CONTENT_LENGTH and
    CONTENT_TYPE).

  - Warns if QUERY_STRING is missing, as the cgi module acts
    unpredictably in that case.

  - That CGI-style variables (that don't contain a .) have
    (non-unicode) string values

  - That wsgi.version is a tuple

  - That wsgi.url_scheme is 'http' or 'https' (@@: is this too
    restrictive?)

  - Warns if the REQUEST_METHOD is not known (@@: probably too
    restrictive).

  - That SCRIPT_NAME and PATH_INFO are empty or start with /

  - That at least one of SCRIPT_NAME or PATH_INFO are set.

  - That CONTENT_LENGTH is a positive integer.

  - That SCRIPT_NAME is not '/' (it should be '', and PATH_INFO should
    be '/').

  - That wsgi.input has the methods read, readline, readlines, and
    __iter__

  - That wsgi.errors has the methods flush, write, writelines

* The status is a string, contains a space, starts with an integer,
  and that integer is in range (> 100).

* That the headers is a list (not a subclass, not another kind of
  sequence).

* That the items of the headers are tuples of strings.

* That there is no 'status' header (that is used in CGI, but not in
  WSGI).

* That the headers don't contain newlines or colons, end in _ or -, or
  contain characters codes below 037.

* That Content-Type is given if there is content (CGI often has a
  default content type, but WSGI does not).

* That no Content-Type is given when there is no content (@@: is this
  too restrictive?)

* That the exc_info argument to start_response is a tuple or None.

* That all calls to the writer are with strings, and no other methods
  on the writer are accessed.

* That wsgi.input is used properly:

  - .read() is called with exactly one argument

  - That it returns a string

  - That readline, readlines, and __iter__ return strings

  - That .close() is not called

  - No other methods are provided

* That wsgi.errors is used properly:

  - .write() and .writelines() is called with a string

  - That .close() is not called, and no other methods are provided.

* The response iterator:

  - That it is not a string (it should be a list of a single string; a
    string will work, but perform horribly).

  - That .__next__() returns a string

  - That the iterator is not iterated over until start_response has
    been called (that can signal either a server or application
    error).

  - That .close() is called (doesn't raise exception, only prints to
    sys.stderr, because we only know it isn't called when the object
    is garbage collected).
�	validator�Nz^[a-zA-Z][a-zA-Z0-9\-_]*$z[\000-\037]c��\rSrSrSrSrg)�WSGIWarning�yz2
Raised in response to WSGI-spec-related warnings
�N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r��7/opt/alt/python313/lib64/python3.13/wsgiref/validate.pyrrys��rrc�"�U(d[U6eg�N)�AssertionError)�cond�argss  r�assert_r~s����d�#�#�rc�r�[U5[LaU$[SRU[	U555e)Nz!{0} must be of type str (got {1}))�type�strr�format�repr)�value�titles  r�check_string_typer�s6���U�|�s����
�+�2�2�5�$�u�+�F�H�Hrc�^�U4SjnU$)a�
When applied between a WSGI server and a WSGI application, this
middleware will check for WSGI compliance on a number of levels.
This middleware does not modify the request or response in any
way, but will raise an AssertionError if anything seems off
(except for a failure to close the application iterator, which
will be printed to stderr -- there's no way to raise an exception
at that point).
c�B>^^�[[U5S:HS5 [U(+S5 Uunm[U5 /mUU4Sjn[US5US'[	US5US'T"X#5n[USL=(a US:gS5 [U5 [
UT5$)	N�zTwo arguments required�No keyword arguments allowedc�`>�[[U5S:H=(d [U5S:HSU<35 [U(+S5 USnUSn[U5S:XaUSnOSn[U5 [U5 [	X#5 [U5 TR
S5 [T"U65$)Nr �zInvalid number of arguments: r!r�)r�len�check_status�
check_headers�check_content_type�check_exc_info�append�WriteWrapper)r�kw�status�headers�exc_info�start_response�start_response_starteds     ��r�start_response_wrapper�;validator.<locals>.lint_app.<locals>.start_response_wrapper�s�����C��I��N�4�c�$�i�1�n��59�;�
>���F�:�;��!�W�F��1�g�G��4�y�A�~���7������ ��'�"��v�/��8�$�"�)�)�$�/���� 5�6�6r�
wsgi.input�wsgi.errorsFz>The application must return an iterator, if only an empty list)rr%�
check_environ�InputWrapper�ErrorWrapper�check_iterator�IteratorWrapper)rr,�environr2�iteratorr0r1�applications     @@�r�lint_app�validator.<locals>.lint_app�s������D�	�Q�� 8�9��B��6�7�"&�����g��"$��	7�&!-�W�\�-B� C����!-�g�m�.D�!E��
���w�?�����$�:��U�):�L�	N�	�x� ��x�)?�@�@rr)r=r>s` rrr�s���'A�R�Orc�8�\rSrSrSrSrSrSrSrSr	Sr
g	)
r7�c��Xlgr��input)�self�
wsgi_inputs  r�__init__�InputWrapper.__init__�s���
rc��[[U5S:H5 URR"U6n[[	U5[
L5 U$�Nr$)rr%rD�readr�bytes�rEr�vs   rrK�InputWrapper.read�s:����D�	�Q����J�J�O�O�T�"����Q��5� �!��rc��[[U5S:*5 URR"U6n[[	U5[
L5 U$rJ)rr%rD�readlinerrLrMs   rrQ�InputWrapper.readline�s<����D�	�Q����J�J����&����Q��5� �!��rc���[[U5S:*5 URR"U6n[[	U5[
L5 UHn[[	U5[L5 M U$rJ)rr%rD�	readlinesr�listrL)rEr�lines�lines    rrT�InputWrapper.readlines�sW����D�	�Q����
�
�$�$�d�+����U��t�#�$��D��D��J�%�'�(���rc#�v# �UR5=n(aUv� UR5=n(aMgg7fr)rQ)rErWs  r�__iter__�InputWrapper.__iter__�s1����m�m�o�%�d�%��J��m�m�o�%�d�%�%�s�39�9c��[SS5 g)Nrz input.close() must not be called�r�rEs r�close�InputWrapper.close�s
����5�6rrCN)rr	r
rrGrKrQrTrZr_r
rrrr7r7�s �� �����7rr7c�2�\rSrSrSrSrSrSrSrSr	g)	r8��c��Xlgr��errors)rE�wsgi_errorss  rrG�ErrorWrapper.__init__����!�rc�n�[[U5[L5 URR	U5 gr)rrrre�write�rE�ss  rrj�ErrorWrapper.write�s$����Q��3��������!�rc�8�URR5 gr)re�flushr^s rro�ErrorWrapper.flush�s�������rc�8�UHnURU5 M gr)rj)rE�seqrWs   r�
writelines�ErrorWrapper.writelines�s���D��J�J�t��rc��[SS5 g)Nrz!errors.close() must not be calledr]r^s rr_�ErrorWrapper.close�s
����6�7rrdN)
rr	r
rrGrjrorsr_r
rrrr8r8�s��"����8rr8c� �\rSrSrSrSrSrg)r+��c��Xlgr��writer)rE�wsgi_writers  rrG�WriteWrapper.__init__�rhrc�Z�[[U5[L5 URU5 gr)rrrLr{rks  r�__call__�WriteWrapper.__call__�s����Q��5� �!����A�rrzN)rr	r
rrGrr
rrrr+r+�s��"�rr+c� �\rSrSrSrSrSrg)�PartialIteratorWrapper�c��Xlgr�r<)rE�
wsgi_iterators  rrG�PartialIteratorWrapper.__init__�s��%�
rc�.�[URS5$r)r:r<r^s rrZ�PartialIteratorWrapper.__iter__s���t�}�}�d�3�3rr�N)rr	r
rrGrZr
rrrr�r��s��&�4rr�c�2�\rSrSrSrSrSrSrSrSr	g)	r:ic�J�Xl[U5UlSUlX lg)NF)�original_iterator�iterr<�closed�check_start_response)rEr�r�s   rrG�IteratorWrapper.__init__s!��!.���]�+��
����$8�!rc��U$rrr^s rrZ�IteratorWrapper.__iter__s���rc��[UR(+S5 [UR5n[	U5[
La[SSU<S35 URb[URS5 SUlU$)NzIterator read after closedFz!Iterator yielded non-bytestring (�)zjThe application returns and we started iterating over its body, but start_response has not yet been called)rr��nextr<rrLr�)rErNs  r�__next__�IteratorWrapper.__next__si���D�K�K��(�	*���������7�%���E�Q�H�I��$�$�0��D�-�-�|�
~�(,�D�%��rc�~�SUl[URS5(aURR5 gg)NTr_)r��hasattrr�r_r^s rr_�IteratorWrapper.closes3������4�)�)�7�3�3��"�"�(�(�*�4rc��UR(d[RRS5 [	URS5 g)Nz/Iterator garbage collected without being closed)r��sys�stderrrjrr^s r�__del__�IteratorWrapper.__del__ s0���{�{��J�J���A�
C�����=�	?r)r�r�r<r�N)
rr	r
rrGrZr�r_r�r
rrrr:r:s��9��
�+�
?rr:c���[[U5[LS[U5<SU<S35 SHn[X;SU<35 M SHn[X;SU<SUS	S<S
35 M SU;a[R"S[
5 UR
5HBnS
U;aM[[X5[LSU<S[X5<SX<S35 MD [[US5[LSUS<S35 [USS;SUS-5 [US5 [US5 USS;a![R"SUS-[
5 [URS5(+=(d USRS5SUS-5 [URS5(+=(d USRS5SUS-5 URS 5(a![[US 5S!:�S"US -5 URS5(d[SU;S#5 [URS5S:gS$5 g)%Nz&Environment is not of the right type: z (environment: r�)	�REQUEST_METHOD�SERVER_NAME�SERVER_PORT�wsgi.versionr4r5zwsgi.multithreadzwsgi.multiprocessz
wsgi.run_oncez"Environment missing required key: )�HTTP_CONTENT_TYPE�HTTP_CONTENT_LENGTHz%Environment should not have the key: z (use �z	 instead)�QUERY_STRINGz�QUERY_STRING is not in the WSGI environment; the cgi module will use sys.argv when this variable is missing, so application errors are more likely�.zEnvironmental variable z is not a string: z	 (value: r�z wsgi.version should be a tuple (zwsgi.url_scheme)�http�httpszwsgi.url_scheme unknown: %rr4r5r�)�GET�HEAD�POST�OPTIONS�PATCH�PUT�DELETE�TRACEzUnknown REQUEST_METHOD: %r�SCRIPT_NAME�/z$SCRIPT_NAME doesn't start with /: %r�	PATH_INFOz"PATH_INFO doesn't start with /: %r�CONTENT_LENGTHrzInvalid CONTENT_LENGTH: %rzgOne of SCRIPT_NAME or PATH_INFO are required (PATH_INFO should at least be '/' if SCRIPT_NAME is empty)zOSCRIPT_NAME cannot be '/'; it should instead be '', and PATH_INFO should be '/')rr�dict�warnings�warnr�keysr�tuple�check_input�check_errors�get�
startswith�int)r;�keys  rr6r6'sj���D��M�T�!���=�'�	#�$�!��	���69�;�	=�	!�<����"�"%�s�1�2�w�
0�	1�<�
�W�$��
�
�
4�
�		��|�|�~���#�:����W�\�"�c�)��D���&���
6�	7�	��D���(�)�U�2�18��1H�J�L��G�%�&�*;�;�%��0A�(B�B�D����%�&����'�(��� �)M�M��
�
�(�7�3C�+D�D��	�����M�*�*�
6��}�%�0�0��5�.���1G�G�I�����K�(�(�
4��{�#�.�.�s�3�,�w�{�/C�C�E��{�{�#�$�$���G�,�-�.�!�3�(�7�3C�+D�D�	F��;�;�}�%�%���w�&�
>�	?��G�K�K�
�&�#�-�	"�#rc�P�SH n[[X5SU<SU<35 M" g)N)rKrQrTrZzwsgi.input (�) doesn't have the attribute �rr�)rF�attrs  rr�r�hs%��=����
�)��4�
!�	"�>rc�P�SH n[[X5SU<SU<35 M" g)N)rorjrsz
wsgi.errors (r�r�)rfr�s  rr�r�ns%��0�����*��D�
"�	#�1rc�$�[US5nURSS5Sn[[U5S:HSU-5 [	U5n[US:�SU-5 [U5S:d	USS	:wa[
R"S
U-[5 gg)N�Statusr$rr#z)Status codes must be three characters: %r�dzStatus code is invalid: %r�� zjThe status string (%r) should be a three-digit integer followed by a single space and a status explanation)r�splitrr%r�r�r�r)r-�status_code�
status_ints   rr&r&ts���
�v�x�
0�F��,�,�t�Q�'��*�K��C����!�3�k�A�C��[�!�J��J�#��;�j�H�I�
�6�{�Q��&��)�s�*��
�
�
B��
�!�	#�+rc
��[[U5[LSU<S[U5<35 UGHWn[[U5[LSU<S[U5<35 [[	U5S:H5 Uup#[US5n[US5n[UR
5S:gS	U-5 [S
U;=(a SU;SU-5 [[RU5S
U-5 [URS5(+=(a URS5(+SU-5 [RU5(dGM [SSU<S[RU5RS5<S35 GMZ g)Nz	Headers (z) must be of type list: zIndividual headers (z) must be of type tuple: r �Header namezHeader valuer-zyThe Status header cannot be used; it conflicts with CGI script, and HTTP status is not given through headers (value: %r).�
�:z,Header names may not contain ':' or '\n': %rzBad header name: %r�-�_z#Names may not end in '-' or '_': %rrzBad header value: z (bad char: r�)rrrUr�r%r�lower�	header_re�search�endswith�bad_header_value_re�group)r.�item�namers    rr'r'�sN���D��M�T�!��D��M�	#�$�����T�
�e�#��T�$�Z�
!�	"�	��D�	�Q������ ��}�5��!�%��8����
�
���(�
�"�
#�	$�	��D� �4�S��_�;�d�B�	D��	� � ��&�(=��(D�E��D�M�M�#�&�&�A�t�}�}�S�/A�+A�1�D�8�	:��%�%�e�,�,��A��)�0�0��7�=�=�a�@�B�
C�%rc��[US5n[URSS5S5nSnUH=upE[US5nUR5S:XdM'X#;a g[	SSU-5 M? X#;a[	SSU-5 gg)	Nr�r$r)��i0r�zcontent-typezJContent-Type header found in a %s response, which must not return content.z,No Content-Type header found in headers (%s))rr�r�r�r)r-r.�code�NO_MESSAGE_BODYr�rs      rr(r(�s���
�v�x�
0�F��v�|�|�D�!�$�Q�'�(�D�!�O���� ��}�5���:�:�<�>�)��*���A�9�<@�A�
B���"���A�G�K�L�#rc	�r�[USL=(d [U5[LSU<S[U5<35 g)Nz
exc_info (z) is not a tuple: )rrr�)r/s rr)r)�s-���H���7��X��%� 7��.6��X��G�Irc�N�[[U[[45(+S5 g)NzwYou should not return a string as your application iterator, instead return a single-item list containing a bytestring.)r�
isinstancerrLr�s rr9r9�s#���
�8�c�5�\�2�2�	E�Fr)r�__all__�rer�r��compiler�r��Warningrrrrr7r8r+r�r:r6r�r�r&r'r(r)r9rrr�<module>r�s���
i�T�-��
�
���J�J�3�4�	��j�j��0���'��
$�H�5�n7�7�@8�8�&��4�4�!?�!?�F?#�B"�#�#�C�2M� I�
Fr
© 2025 GrazzMean-Shell