File "heuristics.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyc
File size: 5.8 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit


abc@sddlZddlZddlmZmZmZddlmZmZdZddZ
dZdefdYZ
d	e
fd
YZde
fdYZd
e
fdYZdS(iN(t
formatdatet	parsedatetparsedate_tz(tdatetimet	timedeltas%a, %d %b %Y %H:%M:%S GMTcCs|ptj}||S(N(Rtnow(tdeltatdate((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pytexpire_afterscCsttj|jS(N(Rtcalendarttimegmt	timetuple(tdt((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pytdatetime_to_headerst
BaseHeuristiccBs#eZdZdZdZRS(cCsdS(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.
        s110 - "Response is Stale"((tselftresponse((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pytwarnings	cCsiS(sUpdate 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.
        ((RR((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pytupdate_headers!scCsa|j|}|r]|jj||j|}|dk	r]|jji|d6q]n|S(NtWarning(RtheaderstupdateRtNone(RRtupdated_headerstwarning_header_value((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pytapply*s(t__name__t
__module__RRR(((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyRs			tOneDayCachecBseZdZdZRS(sM
    Cache the response by providing an expires 1 day in the
    future.
    cCsni}d|jkrjt|jd}ttdddt|d }t||d<d|d<n|S(NtexpiresRtdaysiitpublics
cache-control(RRRRRR
(RRRRR((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyR;s
(RRt__doc__R(((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyR6stExpiresAftercBs)eZdZdZdZdZRS(s;
    Cache **all** requests for a defined time period.
    cKst||_dS(N(RR(Rtkw((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyt__init__LscCs't|j}it|d6dd6S(NRRs
cache-control(RRR
(RRR((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyROs
cCsd}||jS(Ns:110 - Automatically cached for %s. Response might be stale(R(RRttmpl((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyRVs(RRR R#RR(((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyR!Gs		tLastModifiedcBsMeZdZeddddddddd	d
dgZdZd
ZRS(s
    If there is no Expires header already, fall back on Last-Modified
    using the heuristic from
    http://tools.ietf.org/html/rfc7234#section-4.2.2
    to calculate a reasonable value.

    Firefox also does something like this per
    https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching_FAQ
    http://lxr.mozilla.org/mozilla-release/source/netwerk/protocol/http/nsHttpResponseHead.cpp#397
    Unlike mozilla we limit this to 24-hr.
    iiiii,i-iiiiic
Cs8|j}d|kriSd|kr9|ddkr9iS|j|jkrOiSd|ksgd|krkiStjt|d}t|d}|dks|dkriStj}t	d||}|tj|}t	dt
|dd
}||kriS||}	itjttj
|	d6S(NRs
cache-controlRRs
last-modifiedii
iiiQ(Rtstatustcacheable_by_default_statusesR	R
RRRttimetmaxtmintstrftimetTIME_FMTtgmtime(
RtrespRRt
last_modifiedRtcurrent_ageRtfreshness_lifetimeR((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyRks*	
cCsdS(N(R(RR.((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyRs(RRR tsetR'RR(((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyR%[s
*	(R	R(temail.utilsRRRRRR,RRR
tobjectRRR!R%(((sG/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyt<module>s	"