ok
Direktori : /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/ |
Current File : //opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/heuristics.pyo |
� Bu�_c @ s� d d l Z d d l Z d d l m Z m Z m Z d d l m Z m Z d Z d d � Z d � Z d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d S( i����N( t formatdatet parsedatet parsedate_tz( t datetimet timedeltas %a, %d %b %Y %H:%M:%S GMTc C s | p t j � } | | S( N( R t utcnow( t deltat date( ( sT /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/heuristics.pyt expire_after s c C s t t j | j � � � S( N( R t calendart timegmt timetuple( t dt( ( sT /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/heuristics.pyt datetime_to_header s t BaseHeuristicc B s# e Z d � Z d � Z d � Z RS( c C s d S( s! Return a valid 1xx warning header value describing the cache adjustments. The response is provided too allow warnings like 113 http://tools.ietf.org/html/rfc7234#section-5.5.4 where we need to explicitly say response is over 24 hours old. s 110 - "Response is Stale"( ( t selft response( ( sT /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/heuristics.pyt warning s c C s i S( s� Update the response headers with any new headers. NOTE: This SHOULD always include some Warning header to signify that the response was cached by the client, not by way of the provided headers. ( ( R R ( ( sT /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/heuristics.pyt update_headers! s c C sa | j | � } | r] | j j | � | j | � } | d k r] | j j i | d 6� q] n | S( Nt Warning( R t headerst updateR t None( R R t updated_headerst warning_header_value( ( sT /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/heuristics.pyt apply* s ( t __name__t __module__R R R ( ( ( sT /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/heuristics.pyR s t OneDayCachec B s e Z d Z d � Z RS( sM Cache the response by providing an expires 1 day in the future. c C sn i } d | j k rj t | j d � } t t d d � d t | d � �} t | � | d <d | d <n | S( Nt expiresR t daysi i t publics cache-control( R R R R R R ( R R R R R ( ( sT /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/heuristics.pyR <