Ticket #14812: rev14693_staticfiles.diff

File rev14693_staticfiles.diff, 738 bytes (added by alexey.smolsky@…, 14 years ago)
  • django/contrib/staticfiles/views.py

     
    150150            raise ValueError
    151151        matches = re.match(r"^([^;]+)(; length=([0-9]+))?$", header,
    152152                           re.IGNORECASE)
    153         header_mtime = mktime_tz(parsedate_tz(matches.group(1)))
     153        header_date = parsedate_tz(matches.group(1))
     154        if header_date is None:
     155            raise ValueError
     156        header_mtime = mktime_tz(header_date)
    154157        header_len = matches.group(3)
    155158        if header_len and int(header_len) != size:
    156159            raise ValueError
Back to Top