OwlCyberSecurity - MANAGER
Edit File: gzip.cpython-39.pyc
a kH�f� � @ 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 ZdZdZdd� 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. �d c s |j st|j�dk r|S |�d�r&|S t|d� |j�dd�}t�|�sL|S |j r�|j rv|j � � �fdd�}|� |_ nt|j �jd�|_ |j d = n@t|j�jd�}t|�t|j�kr�|S ||_tt|j��|j d <