From 722d978a73a222eea3eb45f05788169e19a817f2 Mon Sep 17 00:00:00 2001 From: AndrewD Date: Wed, 7 Mar 2012 22:15:36 -0500 Subject: [PATCH] Modified addslash & removeslash to use permanent redirect --- tornado/web.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tornado/web.py b/tornado/web.py index a516372d..c66fa4e0 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -1100,7 +1100,7 @@ def removeslash(method): if uri: # don't try to redirect '/' to '' if self.request.query: uri += "?" + self.request.query - self.redirect(uri) + self.redirect(uri, permanent = True) return else: raise HTTPError(404) @@ -1122,7 +1122,7 @@ def addslash(method): uri = self.request.path + "/" if self.request.query: uri += "?" + self.request.query - self.redirect(uri) + self.redirect(uri, permanent = True) return raise HTTPError(404) return method(self, *args, **kwargs)