usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyo000064400000013461147205646020022231 0ustar00 abc@sddlZddlZddlmZmZmZddlmZmZdZddZ dZ de fdYZ d e fd YZd e 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_after scCsttj|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 t OneDayCachecBseZdZdZRS(sM Cache the response by providing an expires 1 day in the future. cCsni}d|jkrjt|jd}ttdddt|d }t||ds    "