Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/django/middleware/__pycache__/ |
Upload File : |
o �a^ � @ sP d dl mZ d dlmZ d dlmZ d dlmZmZ ed�Z G dd� de�Z dS ) � )�patch_vary_headers)�MiddlewareMixin)�_lazy_re_compile)�compress_sequence�compress_stringz\bgzip\bc @ s e Zd ZdZdd� ZdS )�GZipMiddlewarez� Compress content if the browser allows gzip compression. Set the Vary header accordingly, so that caches will base their storage on the Accept-Encoding header. c C s� |j st|j�dk r|S |�d�r|S t|d� |j�dd�}t�|�s&|S |j r4t |j �|_ |jd= nt|j�}t|�t|j�krD|S ||_t t|j��|jd<