mirror of
https://github.com/django/django.git
synced 2025-10-29 16:46:11 +00:00
Fixed #18675 -- Fixed was_modified_since with floating-point mtime
Thanks Simon Charette for the patch.
This commit is contained in:
@@ -138,7 +138,7 @@ def was_modified_since(header=None, mtime=0, size=0):
|
||||
header_len = matches.group(3)
|
||||
if header_len and int(header_len) != size:
|
||||
raise ValueError
|
||||
if mtime > header_mtime:
|
||||
if int(mtime) > header_mtime:
|
||||
raise ValueError
|
||||
except (AttributeError, ValueError, OverflowError):
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user