Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/werkzeug/sansio/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/werkzeug/sansio/__pycache__/http.cpython-312.pyc

�

'ٜg����ddlmZddlZddlZddlmZddlmZddlm	Z	ddlm
Z
ddlmZdd	lmZdd
lm
Z
ejd�Z									d																			dd�Zejd
ej"ej$z��Zejd�Zdd�Z		d					dd�ZddlmZy)�)�annotationsN)�datetime�)�
_dt_as_utc)�
generate_etag)�
parse_date)�parse_etags)�parse_if_range_header)�unquote_etagz&([Ww]/)?(?:"(.*?)"|(.*?))(?:\s*,\s*|$)c	�>�|�|�t|�}n
|�td��d}	t|t�rt	|�}|�t|j
d���}d}
|s
|�t|�}
|
�|
j�
|
j}nt	|�}|r	|r||krd}	|r�t|�\}}|
�3|
j�'t|
j�j|�}	|	St|�}
|
r|
j|�}	t|�}|r|j|�}	|	S)aConvenience method for conditional requests.
    :param http_range: Range HTTP header
    :param http_if_range: If-Range HTTP header
    :param http_if_modified_since: If-Modified-Since HTTP header
    :param http_if_none_match: If-None-Match HTTP header
    :param http_if_match: If-Match HTTP header
    :param etag: the etag for the response for comparison.
    :param data: or alternatively the data of the response to automatically
                 generate an etag using :func:`generate_etag`.
    :param last_modified: an optional date of the last modification.
    :param ignore_if_range: If `False`, `If-Range` header will be taken into
                            account.
    :return: `True` if the resource was modified, otherwise `False`.

    .. versionadded:: 2.2
    Nzboth data and etag givenFr)�microsecondT)r�	TypeError�
isinstance�strrr�replacer
�dater�etagr	�contains�
contains_weak�	is_strong)�
http_range�
http_if_range�http_if_modified_since�http_if_none_match�
http_if_matchr�data�
last_modified�ignore_if_range�
unmodified�if_range�modified_since�_�
if_none_match�if_matchs               �?/usr/local/lib/python3.12/site-packages/werkzeug/sansio/http.py�is_resource_modifiedr&s?��6�|��(��T�"��	
�	��2�3�3��J��-��%�"�=�1�
�� �"�=�#8�#8�Q�#8�#G�H�
��H��z�5�)��7�����
�
� 9�*2�-�-��#�$:�;���-�M�^�,K��
���t�$���a���H�M�M�$=�$�X�]�]�3�<�<�T�B�J� �>��(�(:�;�M��+�8�8��>�
�
#�=�1�H��!)�!3�!3�D�!9�9�
��>��zr
    ([^=;]*)
    (?:\s*=\s*
      (
        "(?:[^\\"]|\\.)*"
      |
        .*?
      )
    )?
    \s*;\s*
    )�flagss\\([0-3][0-7]{2}|.)c�|�|jd�}t|�dk(r|St|d�jdd�S)N���big)�group�len�int�to_bytes)�m�vs  r%�_cookie_unslash_replacer3qs8��	����
�A�
�1�v��{����q�!�9���a��'�'r'c���|�$tjdtj�}|s|�S|�d�}g}tj|�D]�\}}|j
�}|j
�}|s�)t|�dk\rO|d|dcxk(rdk(r>nn;tjt|ddj��jd�	�}|j||f���||�S)
a)Parse a cookie from a string.

    The same key can be provided multiple times, the values are stored
    in-order. The default :class:`MultiDict` will have the first value
    first, and all values can be retrieved with
    :meth:`MultiDict.getlist`.

    :param cookie: The cookie header as a string.
    :param cls: A dict-like class to store the parsed cookies in.
        Defaults to :class:`MultiDict`.

    .. versionchanged:: 3.0
        Passing bytes, and the ``charset`` and ``errors`` parameters, were removed.

    .. versionadded:: 2.2
    ztype[ds.MultiDict[str, str]]�;rr����"r*r)�errors)�t�cast�ds�	MultiDict�
_cookie_re�findall�stripr.�_cookie_unslash_re�subr3�encode�decode�append)�cookie�cls�out�ck�cvs     r%�parse_cookierJzs���(�{��f�f�3�R�\�\�B����u���x�q�\�F�
�C��$�$�V�,���B�
�X�X�Z��
�X�X�Z�����r�7�a�<�B�q�E�R��V�2�s�2�#�'�'�'��A�b����):���f�I�f�&�
�	�
�
�B��8��-��s�8�Or')�datastructures)	NNNNNNNNT)r�
str | NonerrLrrLrrLrrLrrLrzbytes | Nonerzdatetime | str | Noner�bool�returnrM)r1zt.Match[bytes]rN�bytes)NN)rErLrFz#type[ds.MultiDict[str, str]] | NonerNzds.MultiDict[str, str])�
__future__r�re�typingr9r�	_internalr�httprrr	r
r�compile�_etag_rer&�ASCII�VERBOSEr=r@r3rJ�rKr;�r'r%�<module>r[s1��"�	���"� ���(���2�:�:�?�@��"� $�)-�%)� $���+/� �L��L��L�'�L�#�	L�
�L��
L��L�)�L��L�
�L�^�R�Z�Z�
�
�(�(�R�Z�Z�
�
�
� �R�Z�Z� 7�8��(��/3�,��,�	,�,��,�`$r'

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists