Skip to content

Commit

Permalink
remove ftp stuff from url_for
Browse files Browse the repository at this point in the history
  • Loading branch information
lixxu committed Nov 8, 2018
1 parent 22118db commit 603c985
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sanic/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,10 +705,8 @@ def url_for(self, view_name: str, **kwargs):
except (ValueError, TypeError):
pass # just ignore it
else:
if (
(scheme == "http" and port != 80)
or (scheme == "https" and port != 443)
or (scheme in ("ftp", "ftps") and port != 21)
if (scheme == "http" and port != 80) or (
scheme == "https" and port != 443
):
netloc = "{}:{}".format(netloc, port)

Expand Down

0 comments on commit 603c985

Please sign in to comment.