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

Fix regression on route paths with colons #1675

Merged
merged 1 commit into from Jun 4, 2022
Merged

Conversation

florimondmanca
Copy link
Member

@florimondmanca florimondmanca commented Jun 4, 2022

Fixes tiangolo/fastapi#4892 which was introduced in 0.18.0 via #1322.

Narrower alternative to #1657, that also reorganizes tests introduced by #1322 so that the "'Host' header matching should ignore ports" behavior is clearer.

(Matching when host string and requested Host have the exact same :port is the intuitive case. What's special is Starlette matches even in case of absent or different port in Host.)

@florimondmanca florimondmanca requested review from Kludex and a team Jun 4, 2022
Kludex
Kludex approved these changes Jun 4, 2022
Copy link
Sponsor Member

@Kludex Kludex left a comment

Thanks for this. 👍

@florimondmanca florimondmanca changed the title Fix regression on route names with colons Fix regression on route path with colons Jun 4, 2022
@florimondmanca florimondmanca changed the title Fix regression on route path with colons Fix regression on route paths with colons Jun 4, 2022
@Kludex
Copy link
Sponsor Member

Kludex commented Jun 4, 2022

We can add a co-author when squashing for the original author. That's what I usually do, but act as you like. 🙏

@florimondmanca
Copy link
Member Author

florimondmanca commented Jun 4, 2022

I can add @bodograumann as a co-author then. :)

@florimondmanca florimondmanca merged commit b588ebe into master Jun 4, 2022
4 checks passed
@florimondmanca florimondmanca deleted the fm/route-colons branch Jun 4, 2022
@aminalaee aminalaee mentioned this pull request Jun 4, 2022
@bodograumann
Copy link
Contributor

bodograumann commented Jun 7, 2022

Thanks for merging this fix. I'm really happy this project is so active!

@Kludex
Copy link
Sponsor Member

Kludex commented Jun 7, 2022

Thank you for bringing a solution right away! 🎉

This will be available on Starlette 0.20.2, which is going to be released today. JFYK :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When a url contains colon, it makes 404 response. After I upgrade fastapi from 0.75.0 to 0.77.1.
3 participants