HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/django/middleware/__pycache__/gzip.cpython-310.pyc
o

�a^�@sPddlmZddlmZddlmZddlmZmZed�Z	Gdd�de�Z
dS)	�)�patch_vary_headers)�MiddlewareMixin)�_lazy_re_compile)�compress_sequence�compress_stringz\bgzip\bc@seZdZdZdd�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.
    cCs�|jst|j�dkr|S|�d�r|St|d�|j�dd�}t�|�s&|S|jr4t	|j
�|_
|jd=nt|j�}t|�t|j�krD|S||_t
t|j��|jd<|�d�}|rd|�d�rdd	||jd<d
|jd<|S)N��zContent-Encoding)zAccept-Encoding�HTTP_ACCEPT_ENCODING�zContent-Length�ETag�"zW/�gzip)�	streaming�len�content�
has_headerr�META�get�re_accepts_gzip�searchr�streaming_content�headersr�str�
startswith)�self�request�response�ae�compressed_content�etag�r �8/usr/lib/python3/dist-packages/django/middleware/gzip.py�process_responses*






zGZipMiddleware.process_responseN)�__name__�
__module__�__qualname__�__doc__r"r r r r!r	srN)�django.utils.cacher�django.utils.deprecationr�django.utils.regex_helperr�django.utils.textrrrrr r r r!�<module>s