Merge branch 'master' into python2
authorFredrik Tolf <fredrik@dolda2000.com>
Wed, 23 Apr 2014 01:35:56 +0000 (03:35 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Wed, 23 Apr 2014 01:35:56 +0000 (03:35 +0200)
wrw/util.py

index 7459b6d..f70680e 100644 (file)
@@ -258,6 +258,6 @@ class specdirty(sessiondata):
 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)