Fixed datecheck bug.
authorFredrik Tolf <fredrik@dolda2000.com>
Wed, 23 Apr 2014 01:35:46 +0000 (03:35 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Wed, 23 Apr 2014 01:35:46 +0000 (03:35 +0200)
wrw/util.py

index 7c42eae..557b25d 100644 (file)
@@ -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)