Fix: the Chinese URI

This commit is contained in:
howie6879
2018-01-07 12:06:21 +08:00
parent 42cd424274
commit e34de96b24
2 changed files with 6 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ import re
from collections import defaultdict, namedtuple
from collections.abc import Iterable
from functools import lru_cache
from urllib.parse import unquote
from sanic.exceptions import NotFound, MethodNotSupported
from sanic.views import CompositionView
@@ -373,6 +374,7 @@ class Router:
:param method: request method
:return: handler, arguments, keyword arguments
"""
# url = unquote(url)
url = host + url
# Check against known static routes
route = self.routes_static.get(url)