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

Escape routing regex in path segment literals #1719

Merged
merged 2 commits into from
Sep 8, 2022
Merged

Conversation

hlbarber
Copy link
Contributor

@hlbarber hlbarber commented Sep 8, 2022

Motivation and Context

When constructing the regex to match routes we should escape path segments deemed as literals.

This is covered by the HttpRequestWithRegexLiteral protocol test

This has caused problems here.

Description

Escape PathSegment::Literals so that they don't contribute to the routing regex.

@hlbarber hlbarber requested a review from a team as a code owner September 8, 2022 14:20
Copy link
Contributor

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the quick fix!

@hlbarber hlbarber enabled auto-merge (squash) September 8, 2022 14:32
@github-actions
Copy link

github-actions bot commented Sep 8, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

@hlbarber hlbarber merged commit e008387 into main Sep 8, 2022
@hlbarber hlbarber deleted the harryb/escape-regex branch September 8, 2022 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Rust server SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants