
    P}bg^                     l    d dl mZ d dlmZ d dlmZ d dlmZmZ  ed          Z	 G d de          Z
dS )	    )patch_vary_headers)MiddlewareMixin)_lazy_re_compile)compress_sequencecompress_stringz\bgzip\bc                       e Zd ZdZd ZdS )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         st          |j                  dk     r|S |                    d          r|S t	          |d           |j                            dd          }t                              |          s|S |j         r"t          |j
                  |_
        |j        d= nkt          |j                  }t          |          t          |j                  k    r|S ||_        t          t          |j                            |j        d<   |                    d          }|r"|                    d          rd	|z   |j        d<   d
|j        d<   |S )N   zContent-Encoding)zAccept-EncodingHTTP_ACCEPT_ENCODING zContent-LengthETag"zW/gzip)	streaminglencontent
has_headerr   METAgetre_accepts_gzipsearchr   streaming_contentheadersr   str
startswith)selfrequestresponseaecompressed_contentetags         i/home/e360mart.nyusoft.in/public_html/e360mart_env/lib/python3.11/site-packages/django/middleware/gzip.pyprocess_responsezGZipMiddleware.process_response   sk   ! 	c(*:&;&;c&A&AO 122 	O8%9:::\4b99%%b)) 	O 	L *;8;U)V)VH& !122 "11A!B!B%&&#h.>*?*???1H14S9I5J5J1K1KH-.
 ||F## 	3DOOC(( 	3'+d{HV$/5+,    N)__name__
__module____qualname____doc__r$    r%   r#   r	   r	   	   s-         
$ $ $ $ $r%   r	   N)django.utils.cacher   django.utils.deprecationr   django.utils.regex_helperr   django.utils.textr   r   r   r	   r*   r%   r#   <module>r/      s    1 1 1 1 1 1 4 4 4 4 4 4 6 6 6 6 6 6 @ @ @ @ @ @ @ @"";//* * * * *_ * * * * *r%   