X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Fresp.py;h=e901988fe62e2c74d3f99f33774460e217350c7f;hb=98cc090c6a4c3d87e5ee411c056e60f17da31e76;hp=24896bab3b0512bfef2cf7c408586fa41caffbaa;hpb=3162cb89d51c4df9eec6c979d20bc4a2c82da5f9;p=wrw.git diff --git a/wrw/resp.py b/wrw/resp.py index 24896ba..e901988 100644 --- a/wrw/resp.py +++ b/wrw/resp.py @@ -42,7 +42,7 @@ class message(dispatch.restart): self.detail = detail def handle(self, req): - return skelfor(req).error(req, self.message, *self.detail) + return skelfor(req).message(req, self.message, *self.detail) class httperror(usererror): def __init__(self, status, message = None, detail = None): @@ -71,3 +71,9 @@ class redirect(dispatch.restart): req.status(self.status, "Redirect") req.ohead["Location"] = proto.appendurl(proto.requrl(req), self.url) return [] + +class unmodified(dispatch.restart): + def handle(self, req): + req.status(304, "Not Modified") + req.ohead["Content-Length"] = "0" + return []