Skip to content
New issue

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

Do not apply double slash to Blueprint and static dirs #2515

Merged
merged 7 commits into from
Sep 15, 2022

Conversation

ahopkins
Copy link
Member

Fixes #2514

@codecov
Copy link

codecov bot commented Jul 31, 2022

Codecov Report

Base: 87.450% // Head: 87.528% // Increases project coverage by +0.078% 🎉

Coverage data is based on head (d694d1f) compared to base (e499940).
Patch coverage: 100.000% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff              @@
##              main     #2515       +/-   ##
=============================================
+ Coverage   87.450%   87.528%   +0.078%     
=============================================
  Files           69        69               
  Lines         5602      5613       +11     
  Branches       974       976        +2     
=============================================
+ Hits          4899      4913       +14     
+ Misses         509       507        -2     
+ Partials       194       193        -1     
Impacted Files Coverage Δ
sanic/blueprints.py 91.176% <100.000%> (+0.407%) ⬆️
sanic/mixins/routes.py 93.750% <100.000%> (+0.049%) ⬆️
sanic/server/protocols/http_protocol.py 83.823% <0.000%> (+2.205%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ahopkins ahopkins changed the title Do not apply double slash to BP Do not apply double slash to Blueprint and static dirs Jul 31, 2022
Tronic
Tronic previously approved these changes Aug 1, 2022
@Tronic
Copy link
Member

Tronic commented Aug 1, 2022

Works for me. Thanks for the quick fix!

Note: url_prefix should end with a slash for blueprints intended to run as a folder (or at site root), otherwise "" route still becomes a file (which OTOH can make sense for blueprints that only have that one endpoint).

@ahopkins ahopkins self-assigned this Aug 29, 2022
@ahopkins ahopkins marked this pull request as ready for review September 15, 2022 07:30
@ahopkins ahopkins requested a review from a team as a code owner September 15, 2022 07:30
@ahopkins ahopkins merged commit 358498d into main Sep 15, 2022
@ahopkins ahopkins deleted the blueprint-double-slash branch September 15, 2022 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

Inconsistent slashes in Blueprint
2 participants