403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/pip/_vendor/cachecontrol/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pip/_vendor/cachecontrol/__pycache__/controller.cpython-311.pyc
�

�/�c @����dZddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZddlm
Z
eje��Zejd��Zd	Zd
�ZGd�de��ZdS)
z7
The httplib2 algorithms ported for use with requests.
�N)�parsedate_tz)�CaseInsensitiveDict�)�	DictCache�SeparateBodyBaseCache)�
Serializerz9^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?)�-�4c��t�|�����}|d|d|d|d|dfS)z�Parses a URI using the regex given in Appendix B of RFC 3986.

    (scheme, authority, path, query, fragment) = parse_uri(uri)
    r����)�URI�match�groups)�urirs  �E/usr/lib/python3/dist-packages/pip/_vendor/cachecontrol/controller.py�	parse_urirsD��
�Y�Y�s�^�^�
"�
"�
$�
$�F��1�I�v�a�y�&��)�V�A�Y��q�	�B�B�c�p�eZdZdZ	d
d�Zed���Zed���Zd�Zd�Z	d	�Z
dd
�Zdd�Zd�Z
dS)�CacheControllerz4An interface to see if request should cached or not.NTc�~�|�t��n||_||_|p
t��|_|pd|_dS)N)����i,r	r
)r�cache�cache_etagsr�
serializer�cacheable_status_codes)�selfrrr�status_codess     r�__init__zCacheController.__init__'sC��%*�M�Y�[�[�[�u��
�&���$�4�
�����&2�&O�6O��#�#�#rc��t|��\}}}}}|r|std|z���|���}|���}|sd}|rd�||g��p|}|dz|z|z}|S)z4Normalize the URL to create a safe key for the cachez(Only absolute URIs are allowed. uri = %s�/�?z://)r�	Exception�lower�join)	�clsr�scheme�	authority�path�query�fragment�request_uri�
defrag_uris	         r�_urlnormzCacheController._urlnorm/s���6?�s�^�^�2���D�%���	N�Y�	N��F��L�M�M�M��������O�O�%�%�	��	��D��7����$��� 7� 7�?�4���e�^�i�/�+�=�
��rc�,�|�|��S�N)r1)r)rs  r�	cache_urlzCacheController.cache_urlCs���|�|�C� � � rc
��tdftdftdfddddddddtdfd�}|�d|�dd����}i}|�d��D�]
}|���s�|�d	d
��}|d���}	||\}}	n+#t$rt
�d|��Y�|wxYw|r|	sd||<|r�	||d
�����||<��#t$r |	rt
�d
|��Y��t$r%t
�d||j	��Y��	wxYw��|S)NTF)NF)�max-agez	max-stale�	min-fresh�no-cache�no-storezno-transformzonly-if-cachedzmust-revalidate�public�privatezproxy-revalidatezs-maxagez
cache-controlz
Cache-Control��,�=rrz,Ignoring unknown cache-control directive: %sz-Missing value for cache-control directive: %sz8Invalid value for cache-control directive %s, must be %s)
�int�get�split�strip�KeyError�logger�debug�
IndexError�
ValueError�__name__)
r �headers�known_directives�
cc_headers�retval�cc_directive�parts�	directive�typ�requireds
          r�parse_cache_controlz#CacheController.parse_cache_controlGs����T�{��u���t��%�%�)�+�,�#�$� -��d��
�
�� �[�[��'�+�+�o�r�2R�2R�S�S�
���&�,�,�S�1�1�	�	�L��%�%�'�'�
�� �&�&�s�A�.�.�E��a����(�(�I�
� 0�� ;�
��X�X���
�
�
����K�Y�W�W�W���
�����
)�h�
)�$(��y�!��
�
�(+��E�!�H�N�N�,<�,<�(=�(=�F�9�%�%��!���������N�%������"�����L�L�U�!������������
� �
s*�6C�%C*�)C*�9&D � 'E7�	*E7�6E7c�v�|�|j��}t�d|��|�|j��}d|vrt�d��dSd|vr(|ddkrt�d��dS|j�|��}|�t�d	��dSt|jt��r|j�
|��}nd}|j�|||��}|st�
d
��dSt|j��t vrd}t�|��|St#|j��}|rd|vrTd
|vr4t�d��|j�|��t�d��dSt'j��}	t)jt-|d����}
t/d|	|
z
��}t�d|��|�|��}d}
d|vr$|d}
t�d|
��n]d|vrYt-|d��}|�Bt)j|��|
z
}t/d|��}
t�d|
��d|vr#|d}
t�d|
��d|vr(|d}||z
}t�d|��|
|kr8t�d��t�d|
|��|Sd
|vr4t�d��|j�|��dS)ze
        Return a cached response if it exists in the cache, otherwise
        return False.
        zLooking up "%s" in the cacher8z-Request header has "no-cache", cache bypassedFr6rz1Request header has "max_age" as 0, cache bypassedNzNo cache entry availablez1Cache entry deserialization failed, entry ignoredzQReturning cached permanent redirect response (ignoring date and etag information)�date�etagz(Purging cached response: no date or etagz!Ignoring cached response: no datezCurrent age based on date: %iz#Freshness lifetime from max-age: %i�expiresz#Freshness lifetime from expires: %iz+Freshness lifetime from request max-age: %ir7z'Adjusted current age from min-fresh: %iz2The response is "fresh", returning cached responsez%i > %iz4The cached response is "stale" with no etag, purging)r4�urlrDrErRrIrr@�
isinstancer�get_bodyr�loads�warningr?�status�PERMANENT_REDIRECT_STATUSESr�delete�time�calendar�timegmr�max)r �requestr4�cc�
cache_data�	body_file�resp�msgrI�nowrT�current_age�resp_cc�freshness_lifetimerV�expire_time�	min_freshs                 r�cached_requestzCacheController.cached_request}s���
�N�N�7�;�/�/�	����3�Y�?�?�?�
�
%�
%�g�o�
6�
6�������L�L�H�I�I�I��5���?�?�r�)�}��1�1��L�L�L�M�M�M��5��Z�^�^�I�.�.�
����L�L�3�4�4�4��5��d�j�"7�8�8�	��
�+�+�I�6�6�I�I��I���$�$�W�j�)�D�D���	��N�N�N�O�O�O��5��t�{���:�:�:�7�
�
�L�L������K�%�d�l�3�3���	�&��/�/��W�$�$����G�H�H�H��
�!�!�)�,�,�,��L�L�<�=�=�=��5��i�k�k����|�G�F�O�<�<�=�=���!�S�4�Z�(�(�����4�k�B�B�B��*�*�7�3�3��������!(��!3���L�L�>�@R�S�S�S�S��'�
!�
!�"�7�9�#5�6�6�G��"�&�o�g�6�6��=��%(��K�%8�%8�"����B�DV�W�W�W���?�?�!#�I����L�L�=�?Q�
�
�
��"����;��I��9�$�K��L�L�B�K�P�P�P���+�+��L�L�M�N�N�N��L�L��$6��D�D�D��K��� � ��L�L�O�P�P�P��J���i�(�(�(��urc��|�|j��}|j�||j�|����}i}|r2t
|j��}d|vr|d|d<d|vr|d|d<|S)NrU�ETagz
If-None-Matchz
last-modifiedz
Last-ModifiedzIf-Modified-Since)r4rWrrZrr@rrI)r rcr4rg�new_headersrIs      r�conditional_headersz#CacheController.conditional_headers�s����N�N�7�;�/�/�	���$�$�W�d�j�n�n�Y�.G�.G�H�H�����	L�)�$�,�7�7�G��� � �/6�v���O�,��'�)�)�3:�?�3K��/�0��rc�P�t|jt��rT|j�||j�||d��|���|j�||��dS|j�||j�|||��|���dS)z.
        Store the data in the cache.
        r)rVN)rXrr�setr�dumps�set_body)r r4rc�response�body�expires_times      r�
_cache_setzCacheController._cache_sets����d�j�"7�8�8�	�
�J�N�N����%�%�g�x��=�=�$�
�
�
�
�

�J���	�4�0�0�0�0�0��J�N�N����%�%�g�x��>�>�$�
�
�
�
�
�
rc��|p|j}|j|vr#t�d|j|��dSt	|j��}d|vr(t
jt|d����}nd}|�Fd|vrB|d�	��r(t|d��t|��krdS|�|j��}|�|��}	|�
|j��}
t�d|
��d}d|	vrd	}t�d
��d|vrd	}t�d��|rN|j�|
��r4t�d��|j�|
��|rdSd
|�dd��vrt�d��dS|jr�d|vr�d}|�d��r.t|d��}
|
�t
j|
��|z
}t'|d��}t�d�|����t�d��|�|
||||��dSt|j��t,vr4t�d��|�|
||d��dSd|vr�t
jt|d����}d|	vrI|	ddkr=t�d��|	d}|�|
||||��dSd|vr�|dr}t|d��}
|
�t
j|
��|z
}nd}t�d�|����|�|
||||��dSdSdSdS)zc
        Algorithm for caching requests.

        This assumes a requests Response object.
        zStatus code %s not in %sNrTr�content-lengthz&Updating cache with response from "%s"Fr9TzResponse header has "no-store"zRequest header has "no-store"z0Purging existing cache entry to honor "no-store"�*�varyr<zResponse header has "Vary: *"rUrViuz"etag object cached for {0} secondszCaching due to etagzCaching permanent redirectrr6z'Caching b/c date exists and max-age > 0z5Caching b/c of expires header. expires in {0} seconds)rr\rDrErrIr`rar�isdigitr?�lenrRr4rWrr@r^rrb�formatr{r])r rcrxryr!r�response_headersrT�cc_reqrdr4�no_storerzrVs              r�cache_responsezCacheController.cache_responsesb��".�!L��1L���?�"8�8�8��L�L�*�H�O�=S�
�
�
�
�F�.�x�/?�@�@���%�%�%��?�<�0@��0H�#I�#I�J�J�D�D��D�
�� �$4�4�4� �!1�2�:�:�<�<�5��$�%5�6�7�7�3�t�9�9�D�D��F��)�)�'�/�:�:��
�
%�
%�&6�
7�
7���N�N�7�;�/�/�	����=�y�I�I�I��������H��L�L�9�:�:�:������H��L�L�8�9�9�9��	)��
���y�1�1�	)��L�L�K�L�L�L��J���i�(�(�(��	��F��"�&�&�v�r�2�2�2�2��L�L�8�9�9�9��F���9	��*:� :� :��L��#�#�I�.�.�
C�&�'7�	�'B�C�C���&�#+�?�7�#;�#;�d�#B�L��|�Z�8�8�L��L�L�=�D�D�\�R�R�S�S�S��L�L�.�/�/�/��O�O�I�w��$��M�M�M�M�M����
!�
!�%@�
@�
@��L�L�5�6�6�6��O�O�I�w��#�>�>�>�>�>�
�'�
'�
'��?�<�0@��0H�#I�#I�J�J�D��B���2�i�=�1�#4�#4����F�G�G�G�!�)�}��������� �������.�.�.�#�I�.��*�+;�I�+F�G�G�G��*�'/��w�'?�'?�$�'F���'+���L�L�O�V�V�(������
�O�O�!�� ��$������;(�
'� /�.��rc���|�|j��}|j�||j�|����}|s|Sdg�|j�t�fd�|j�	��D������d|_
|�|||��|S)z�On a 304 we will get a new set of headers that we want to
        update our cached value with, assuming we have one.

        This should only ever be called when we've sent an ETag and
        gotten a 304 as the response.
        r}c3�R�K�|]!\}}|����v�||fV��"dSr3)r')�.0�k�v�excluded_headerss   �r�	<genexpr>z9CacheController.update_cached_response.<locals>.<genexpr>�sK��������A�q��7�7�9�9�$4�4�4��A��4�4�4�4��rr)r4rWrrZrr@rI�update�dict�itemsr\r{)r rcrxr4�cached_responser�s     @r�update_cached_responsez&CacheController.update_cached_response�s�����N�N�7�;�/�/�	��/�/�/������	�9R�9R�S�S���	��O�-�-����&�&������$�,�2�2�4�4����
�
�	
�	
�	
�"%���	
���	�7�O�<�<�<��r)NTNN)NN)rH�
__module__�__qualname__�__doc__r"�classmethodr1r4rRrorsr{r�r��rrrr$s�������>�>�KO�P�P�P�P�����[��&�!�!��[�!�4�4�4�ls�s�s�j��� ����(y�y�y�y�v&�&�&�&�&rr)r��logging�rer`r_�email.utilsr�pip._vendor.requests.structuresrrrr�	serializer�	getLoggerrHrD�compilerr]r�objectrr�rr�<module>r�s���
������	�	�	�	���������$�$�$�$�$�$�?�?�?�?�?�?�3�3�3�3�3�3�3�3�!�!�!�!�!�!�
��	�8�	$�	$���b�j�M�N�N��(��C�C�C�S�S�S�S�S�f�S�S�S�S�Sr

Youez - 2016 - github.com/yon3zu
LinuXploit