'Handle bogus If-Modified-Since values gracefully
Assume that a file is modified since an invalid timestamp as per RFC
2616, section 14.25.'

def test_invalid_if_modified_since(self):

    file_name = 'file.txt'
    invalid_date = 'Mon,    28    May    999999999999    28:25:26    GMT'
    response = self.client.get(('/views/site_media/%s' % file_name), HTTP_IF_MODIFIED_SINCE=invalid_date)
    file = open(path.join(media_dir, file_name))
    self.assertEquals(file.read(), response.content)
    self.assertEquals(len(response.content), int(response['Content-Length']))
