bug: url / will be empty

This commit is contained in:
lixxu 2017-02-24 00:45:50 +08:00
parent ff3d33d5e0
commit 28c31359bf

View File

@ -270,7 +270,7 @@ class Sanic:
'Endpoint with name `{}` was not found'.format(
view_name))
if uri.endswith('/'):
if uri != '/' and uri.endswith('/'):
uri = uri[:-1]
out = uri