ignore empty urlpath from legacy handlers
avoids populating urlpath in the presence of a trailing slash or similar
@@ -52,6 +52,6 @@ class LegacyRedirectHandler(BaseHandler):
def get(self, user, repo, urlpath=None):
url = '/v2/gh/{user}/{repo}/master'.format(user=user, repo=repo)
- if urlpath:
+ if urlpath is not None and urlpath.strip('/'):
url = url_concat(url, dict(urlpath=urlpath))
self.redirect(url)
