| 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/django/middleware/__pycache__/ |
Upload File : |
�
�|�eX � �N � d dl mZmZmZ d dlmZ d dlmZ G d� de� � ZdS )� )�cc_delim_re�get_conditional_response�set_response_etag)�MiddlewareMixin)�parse_http_date_safec � � e Zd ZdZd� Zd� ZdS )�ConditionalGetMiddlewarez�
Handle conditional GET operations. If the response has an ETag or
Last-Modified header and the request has If-None-Match or If-Modified-Since,
replace the response with HttpNotModified. Add an ETag header if needed.
c �6 � |j dk r|S | � |� � r$|� d� � st |� � |� d� � }|� d� � }|ot |� � }|s|rt
||||�� � S |S )N�GET�ETagz
Last-Modified)�etag�
last_modified�response)�method�
needs_etag�
has_headerr �getr r )�self�requestr r
r s �8/usr/lib/python3/dist-packages/django/middleware/http.py�process_responsez)ConditionalGetMiddleware.process_response s� � � �>�U�"�"��O��?�?�8�$�$� (�X�-@�-@��-H�-H� (��h�'�'�'��|�|�F�#�#�� ���_�5�5�
�%�M�*>�}�*M�*M�
�� �=� �+���+�!� � � �
� �� c � � t j |� dd� � � � }t d� |D � � � � S )z:Return True if an ETag header should be added to response.z
Cache-Control� c 3 �F K � | ]}|� � � d k V � �dS )zno-storeN)�lower)�.0�headers r � <genexpr>z6ConditionalGetMiddleware.needs_etag.<locals>.<genexpr>) s/ � � � �T�T�F�6�<�<�>�>�Z�/�T�T�T�T�T�Tr )r �splitr �all)r r �cache_control_headerss r r z#ConditionalGetMiddleware.needs_etag&