diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2010-04-07 03:08:30 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2010-04-07 03:08:30 +0200 |
commit | 4476b579319048acb8ce32ffbc3cc31c9ec26568 (patch) | |
tree | 04560df5f60673296238af62caa41ef1e9998b4f /controller.py | |
parent | 58da186c812246821fc5959805e2fd34c6e8e14d (diff) | |
download | web-4476b579319048acb8ce32ffbc3cc31c9ec26568.tar.gz web-4476b579319048acb8ce32ffbc3cc31c9ec26568.tar.bz2 web-4476b579319048acb8ce32ffbc3cc31c9ec26568.zip |
Also allow trailing slashes for redirects
Diffstat (limited to 'controller.py')
-rw-r--r-- | controller.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/controller.py b/controller.py index e819862..0cb2ea9 100644 --- a/controller.py +++ b/controller.py @@ -24,6 +24,7 @@ class Redirect: redirects[name.strip()] = url.strip() def GET(self, name): + if name[-1] == "/": name = name[:-1] if name not in self.redirects: raise web.TempRedirect("/") else: |