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

api: Target schema should be case insensitive #9899

Merged
merged 1 commit into from Feb 17, 2023

Conversation

ejona86
Copy link
Member

@ejona86 ejona86 commented Feb 16, 2023

URI schema are case-insensitive. Previously the code would do case-sensitive matching. We expect NameResolverProviders to return the typical canonical scheme formatting, which is lower-case. If a NameResolverProvider returns an unexpected string (upper case, unicode, etc), then it simply won't ever match. Channel users, however, can use either casing in target strings.

The code implicitly already handled relative URIs by returning null, as Map.get(null) returned null.

URI schema are case-insensitive. Previously the code would do
case-sensitive matching. We expect NameResolverProviders to return the
typical canonical scheme formatting, which is lower-case. If a
NameResolverProvider returns an unexpected string (upper case, unicode,
etc), then it simply won't ever match. Channel users, however, can use
either casing in target strings.

The code implicitly already handled relative URIs by returning null, as
Map.get(null) returned null.
@ejona86 ejona86 requested a review from temawi February 16, 2023 23:44
@ejona86 ejona86 merged commit 305dfee into grpc:master Feb 17, 2023
@ejona86 ejona86 deleted the nr-lowercase branch February 17, 2023 15:57
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants