Skip to content

Conversation

@florimondmanca
Copy link
Contributor

@florimondmanca florimondmanca commented Jun 4, 2022

Fixes fastapi/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 a team and Kludex June 4, 2022 10:59
Copy link
Owner

@Kludex Kludex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Owner

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
Contributor Author

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

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

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

@Kludex
Copy link
Owner

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.

4 participants