Fix call to parse_http_date
authorMagnus Hagander <magnus@hagander.net>
Mon, 7 May 2018 17:20:28 +0000 (19:20 +0200)
committerMagnus Hagander <magnus@hagander.net>
Mon, 7 May 2018 17:23:17 +0000 (19:23 +0200)
Incorrectly merged as parse_http_date() in fb51d9d9, since the code here
used parse_http_date_safe() there was a missing import. Insead, use the
_safe() version here as well.

django/archives/mailarchives/views.py

index e52c221e7fe2200b86fbaac37e5d5cd2b14d64f0..fc09b65e92b6273d0cc3b3da4b05e0fe706e67cd 100644 (file)
@@ -742,7 +742,7 @@ def dynamic_css(request, css):
                matches = re.match(r"^([^;]+)(; length=([0-9]+))?$",
                                                   request.META.get('HTTP_IF_MODIFIED_SINCE'),
                                                   re.IGNORECASE)
-               header_mtime = parse_http_date(matches.group(1))
+               header_mtime = parse_http_date_safe(matches.group(1))
                # We don't do length checking, just the date
                if int(latestmod) <= header_mtime:
                        return HttpResponseNotModified(content_type='text/css')