File manager - Edit - /usr/local/CyberPanel/lib/python3.10/site-packages/django/middleware/__pycache__/http.cpython-310.pyc
Back
o �hP � @ s@ d dl mZmZmZ d dlmZ d dlmZ G dd� de�ZdS )� )�cc_delim_re�get_conditional_response�set_response_etag)�MiddlewareMixin)�parse_http_date_safec @ s e Zd ZdZdd� Zdd� 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 C sf |j dkr|S | �|�r|�d�st|� |�d�}|�d�}|o$t|�}|s)|r1t||||d�S |S )N�GET�ETagz Last-Modified)�etag� last_modified�response)�method� needs_etag� has_headerr �getr r )�self�requestr r r � r �L/usr/local/CyberPanel/lib/python3.10/site-packages/django/middleware/http.py�process_response s �z)ConditionalGetMiddleware.process_responsec C s$ t �|�dd��}tdd� |D ��S )z:Return True if an ETag header should be added to response.z Cache-Control� c s s � | ] }|� � d kV qdS )zno-storeN)�lower)�.0�headerr r r � <genexpr>( s � z6ConditionalGetMiddleware.needs_etag.<locals>.<genexpr>)r �splitr �all)r r �cache_control_headersr r r r % s z#ConditionalGetMiddleware.needs_etagN)�__name__� __module__�__qualname__�__doc__r r r r r r r s r N) �django.utils.cacher r r �django.utils.deprecationr �django.utils.httpr r r r r r �<module> s
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings