Merge pull request #1121 from tandalf/issue-1120

Fixed bug when passing a list into route decorator's host argument #1120
This commit is contained in:
Raphael Deem
2018-02-12 12:48:13 -08:00
committed by GitHub
2 changed files with 41 additions and 0 deletions

View File

@@ -128,6 +128,13 @@ class Router:
if strict_slashes:
return
if not isinstance(host, str) and host is not None:
# we have gotten back to the top of the recursion tree where the
# host was originally a list. By now, we've processed the strict
# slashes logic on the leaf nodes (the individual host strings in
# the list of host)
return
# Add versions with and without trailing /
slashed_methods = self.routes_all.get(uri + '/', frozenset({}))
unslashed_methods = self.routes_all.get(uri[:-1], frozenset({}))