bug: url_for in blueprint may have // at the beginning

This commit is contained in:
lixxu 2017-02-24 00:17:43 +08:00
parent d015d6b103
commit ff3d33d5e0

View File

@ -41,7 +41,7 @@ class Blueprint:
# Prepend the blueprint URI prefix if available
uri = url_prefix + future.uri if url_prefix else future.uri
app.route(
uri=uri,
uri=uri[1:] if uri.startswith('//') else uri,
methods=future.methods,
host=future.host or self.host
)(future.handler)