From: Fredrik Tolf Date: Wed, 23 Apr 2014 01:35:46 +0000 (+0200) Subject: Fixed datecheck bug. X-Git-Url: http://dolda2000.com/gitweb/?p=wrw.git;a=commitdiff_plain;h=438b6207201da45a2f23e6ff207a61a0f57b20f3 Fixed datecheck bug. --- diff --git a/wrw/util.py b/wrw/util.py index 7c42eae..557b25d 100644 --- a/wrw/util.py +++ b/wrw/util.py @@ -267,6 +267,6 @@ class specdirty(sessiondata, metaclass=specclass): def datecheck(req, mtime): if "If-Modified-Since" in req.ihead: rtime = proto.phttpdate(req.ihead["If-Modified-Since"]) - if rtime >= math.floor(mtime): + if rtime is not None and rtime >= math.floor(mtime): raise resp.unmodified() req.ohead["Last-Modified"] = proto.httpdate(mtime)