feat(s3) HeadObject: honor If-Modified-Since header
This commit is contained in:
parent
fe51fadda5
commit
517416c4d9
3 changed files with 46 additions and 2 deletions
|
|
@ -174,11 +174,17 @@ def iso_8601_datetime_without_milliseconds(datetime):
|
|||
return datetime.strftime("%Y-%m-%dT%H:%M:%S") + 'Z'
|
||||
|
||||
|
||||
RFC1123 = '%a, %d %b %Y %H:%M:%S GMT'
|
||||
|
||||
|
||||
def rfc_1123_datetime(datetime):
|
||||
RFC1123 = '%a, %d %b %Y %H:%M:%S GMT'
|
||||
return datetime.strftime(RFC1123)
|
||||
|
||||
|
||||
def str_to_rfc_1123_datetime(str):
|
||||
return datetime.datetime.strptime(str, RFC1123)
|
||||
|
||||
|
||||
def unix_time(dt=None):
|
||||
dt = dt or datetime.datetime.utcnow()
|
||||
epoch = datetime.datetime.utcfromtimestamp(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue