| 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 : |
�
�/�c� � �n � d dl Z d dlZd dlZd dlmZ ddlmZmZ ddlm Z ddl
mZ G d� de� � ZdS ) � N)�HTTPAdapter� )�CacheController�PERMANENT_REDIRECT_STATUSES)� DictCache)�CallbackFileWrapperc �X � � e Zd Zh d�Z d � fd� Zd
� fd� Z d� fd� Z� fd�Z� xZS )�CacheControlAdapter> �PUT�PATCH�DELETENTc �� �� t t | � � j |i |�� |�t � � n|| _ || _ |pd| _ |pt } | | j ||�� � | _ d S )N)�GET)�cache_etags�
serializer) �superr
�__init__r �cache� heuristic�cacheable_methodsr �
controller)�selfr r �controller_classr r r �args�kw�controller_factory� __class__s ��B/usr/lib/python3/dist-packages/pip/_vendor/cachecontrol/adapter.pyr zCacheControlAdapter.__init__ s� �� � 2��!�4�(�(�1�4�>�2�>�>�>�$)�M�Y�[�[�[�u��
�"���!2�!>�h���-�@���,�,��J�K�J�
�
�
����� c �l �� |p| j }|j |v r | j � |� � }n# t j $ r d}Y nw xY w|r| � ||d�� � S |j � | j � |� � � � t t | � � j |fi |��}|S )z�
Send a request. Use the request information to see if it
exists in the cache and cache the response if we need to and can.
NT)�
from_cache)
r �methodr �cached_request�zlib�error�build_response�headers�update�conditional_headersr r
�send)r �requestr r � cacheable�cached_response�respr s �r r* zCacheControlAdapter.send( s� �� �
&�?��)?� ��>�Y�&�&�
'�"&�/�"@�"@��"I�"I�����:�
'�
'�
'�"&����
'�����
V��*�*�7�O�PT�*�U�U�U�
�O�"�"�4�?�#F�#F�w�#O�#O�P�P�P�4�u�(�$�/�/�4�W�C�C��C�C���s �0 �A�AFc �^ ��
� |p| j }|�s |j |v �r| j r| j � |� � }|j dk rN| j � ||� � }||urd}|� d�� � |� � � |}n�t |j � � t v r| j � ||� � net |j
t j | j j ||� � � � |_
|j r&|j �
�
fd�}t% j ||� � |_ t) t* | � � � ||� � }|j | j v r@|j r9| j � |j � � } | j � | � � ||_ |S )z�
Build a response by making a request or using the cache.
This will end up calling send and returning a potentially
cached response
i0 TF)�decode_contentc �h �� �� � | j dk r| j � � � d S d S )Nr )�
chunk_left�_fp�_close)r �super_update_chunk_lengths �r �_update_chunk_lengthz@CacheControlAdapter.build_response.<locals>._update_chunk_lengthr s? �� �1�1�3�3�3��?�a�/�/� �H�O�O�-�-�-�-�-� 0�/r )r r"