← Back
Editing: gzip.cpython-311.pyc
� �|�e^ � �l � d dl mZ d dlmZ d dlmZ d dlmZmZ ed� � Z G d� de� � Z dS ) � )�patch_vary_headers)�MiddlewareMixin)�_lazy_re_compile)�compress_sequence�compress_stringz\bgzip\bc � � e Zd ZdZd� 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 � � |j st |j � � dk r|S |� d� � r|S t |d� � |j � dd� � }t � |� � s|S |j r"t |j � � |_ |j d= nkt |j � � }t |� � t |j � � k r|S ||_ t t |j � � � � |j d<