diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-02-20 21:24:12 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-02-20 21:24:12 +0100 |
commit | 9876d1c69a7797a8896e351deaf4060b6e4c3314 (patch) | |
tree | cbd5c6ca7b049b34361ab24406d45b979634fc8c | |
parent | 6e7c8580c8aad6a6c135e6e59303ed886d305174 (diff) | |
download | debian-dedup-9876d1c69a7797a8896e351deaf4060b6e4c3314.tar.gz |
fix links in index
-rwxr-xr-x | webapp.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -5,7 +5,7 @@ from wsgiref.simple_server import make_server import jinja2 from werkzeug.exceptions import HTTPException, NotFound -from werkzeug.routing import Map, Rule +from werkzeug.routing import Map, Rule, RequestRedirect from werkzeug.wrappers import Request, Response jinjaenv = jinja2.Environment() @@ -98,6 +98,8 @@ class Application(object): elif endpoint == "hash": return self.show_hash(args["function"], args["hashvalue"]) elif endpoint == "index": + if not request.environ["PATH_INFO"]: + raise RequestRedirect(request.environ["SCRIPT_NAME"] + "/") return Response("""<html><head><title>Debian duplication detector</title></head> <body><h1>Debian duplication detector</h1> <ul> |