X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Fresp.py;h=ebd98ecbee1154ec4ca36c1b64a9cf154cc9240e;hb=a9a78095b1696f56946abfc7c284f86a21fdcc2d;hp=b62ce0e4bdefe58d6473977f77c78eaadea9e223;hpb=ad5b93034c1c28f0f4deab4c1b62cb2d6a869f81;p=wrw.git diff --git a/wrw/resp.py b/wrw/resp.py index b62ce0e..ebd98ec 100644 --- a/wrw/resp.py +++ b/wrw/resp.py @@ -70,4 +70,11 @@ class redirect(dispatch.restart): def handle(self, req): req.status(self.status, "Redirect") req.ohead["Location"] = proto.appendurl(proto.requrl(req), self.url) + req.ohead["Content-Length"] = 0 + return [] + +class unmodified(dispatch.restart): + def handle(self, req): + req.status(304, "Not Modified") + req.ohead["Content-Length"] = "0" return []