diff --git a/django/views/static.py b/django/views/static.py
index d9117f2..475df23 100644
a
|
b
|
def was_modified_since(header=None, mtime=0, size=0):
|
132 | 132 | raise ValueError |
133 | 133 | if mtime > header_mtime: |
134 | 134 | raise ValueError |
135 | | except (AttributeError, ValueError): |
| 135 | except (AttributeError, ValueError, OverflowError): |
136 | 136 | return True |
137 | 137 | return False |
diff --git a/tests/regressiontests/views/tests/static.py b/tests/regressiontests/views/tests/static.py
index d7e87d1..62a9786 100644
a
|
b
|
class StaticTests(TestCase):
|
25 | 25 | file = open(path.join(media_dir, file_name)) |
26 | 26 | self.assertEquals(file.read(), response.content) |
27 | 27 | |
| 28 | def test_crazydate(self): |
| 29 | crazy_date = 'Mon, 28 May 999999999999 28:25:26 GMT' |
| 30 | filename = 'file.txt' |
| 31 | response = self.client.get('/views/site_media/%s' % filename, |
| 32 | HTTP_IF_MODIFIED_SINCE=crazy_date) |
| 33 | file = open(path.join(media_dir, filename)) |
| 34 | self.assertEquals(file.read(), response.content) |
| 35 | self.assertEquals(len(response.content), |
| 36 | int(response['Content-Length'])) |