1
0
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:
Claude Paroz
2012-09-26 21:12:56 +02:00
parent b3ee80a0cf
commit 3cbe686af6
3 changed files with 17 additions and 3 deletions

View File

@@ -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