From 28c31359bf863ad6bcef2a49397908ca04f6ac1d Mon Sep 17 00:00:00 2001 From: lixxu Date: Fri, 24 Feb 2017 00:45:50 +0800 Subject: [PATCH] bug: url / will be empty --- sanic/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanic/app.py b/sanic/app.py index 6c55a586..63700e9d 100644 --- a/sanic/app.py +++ b/sanic/app.py @@ -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