
    j.                     F    S SK JrJr  S SKJr  S SKJrJr   " S S\5      rg)    )get_conditional_responseset_response_etag)MiddlewareMixin)parse_http_date_safesplit_directive_namesc                   $    \ rS rSrSrS rS rSrg)ConditionalGetMiddleware   z
Handle conditional GET operations. If the response has an ETag or
Last-Modified header and the request has If-None-Match or
If-Modified-Since, replace the response with HttpNotModified. Add an ETag
header if needed.
c                 8   UR                   S:w  a  U$ U R                  U5      (       a!  UR                  S5      (       d  [        U5        UR	                  S5      nUR	                  S5      nU=(       a    [        U5      nU(       d  U(       a  [        UUUUS9$ U$ )NGETETagzLast-Modified)etaglast_modifiedresponse)method
needs_etag
has_headerr   getr   r   )selfrequestr   r   r   s        N/var/www/html/KUNJ/venv/lib/python3.13/site-packages/django/middleware/http.pyprocess_response)ConditionalGetMiddleware.process_response   s     >>U"O??8$$X-@-@-H-Hh'||F# _5%M*>}*M=++!	      c                 B    [        UR                  SS5      5      nSU;  $ )z:Return True if an ETag header should be added to response.zCache-Control zno-store)r   r   )r   r   
directivess      r   r   #ConditionalGetMiddleware.needs_etag&   s"    *8<<+LM
++r    N)__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes__r   r   r   r	   r	      s    0,r   r	   N)	django.utils.cacher   r   django.utils.deprecationr   django.utils.httpr   r   r	   r   r   r   <module>r)      s    J 4 I#, #,r   