+
+def datecheck(req, mtime):
+ if "If-Modified-Since" in req.ihead:
+ rtime = proto.phttpdate(req.ihead["If-Modified-Since"])
+ if rtime is not None and rtime >= math.floor(mtime):
+ raise resp.unmodified()
+ req.ohead["Last-Modified"] = proto.httpdate(mtime)