We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug There is an inconsistency with how slashes are handled in blueprints when strict_slashes applied in different manner.
strict_slashes
Code snippet
@app.before_server_start async def display(_): for route in app.router.routes: print(route)
The following yields: <Route: name=__main__.bp.index path=foo/>
<Route: name=__main__.bp.index path=foo/>
This is correct ✔️
bp = Blueprint("bp", url_prefix="/foo/", strict_slashes=True) @bp.get("/") async def handler(_): ...
And this yields: <Route: name=__main__.bp.index path=foo//>
<Route: name=__main__.bp.index path=foo//>
This is incorrect ❌
@bp.get("/") async def index(_): ... app.blueprint(bp, url_prefix="/foo/", strict_slashes=True)
Expected behavior Applying prefix with static_slashes in app.blueprint is the same as in Blueprint
static_slashes
app.blueprint
Blueprint
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
There is an inconsistency with how slashes are handled in blueprints when
strict_slashes
applied in different manner.Code snippet
The following yields:
<Route: name=__main__.bp.index path=foo/>
This is correct ✔️
And this yields:
<Route: name=__main__.bp.index path=foo//>
This is incorrect ❌
Expected behavior
Applying prefix with
static_slashes
inapp.blueprint
is the same as inBlueprint
The text was updated successfully, but these errors were encountered: