Skip to content

Fix incorrect UriBuilder.Scheme property documentation about valid schemes #11648

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

Merged
merged 3 commits into from
Aug 4, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 4, 2025

The UriBuilder.Scheme property documentation contained a misleading table that suggested only specific schemes (file, ftp, gopher, http, https, mailto, news) were valid. This was incorrect.

The actual implementation validates scheme names according to RFC 2396 via System.Uri.CheckSchemeName, which allows any valid URI scheme per the RFC specification, not just the predefined list shown in the documentation.

Before:
The remarks section showed a table listing specific "valid scheme names" that implied these were the only acceptable values.

After:
The remarks now accurately state: "The set accessor validates the scheme name for validity according to RFC 2396. The scheme name must begin with a letter and must contain only letters, digits, and the characters '.', '+', or '-'."

This change:

  • Removes the misleading restriction to specific schemes
  • Accurately describes the RFC 2396 validation that actually occurs
  • Follows the same documentation pattern used elsewhere in the codebase (e.g., System.Uri)
  • Allows developers to understand they can use custom schemes like x-custom-protocol or my-scheme as long as they comply with RFC 2396

Fixes #11626.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Incorrect remarks for System.UriBuilder.Scheme property Fix incorrect UriBuilder.Scheme property documentation about valid schemes Aug 4, 2025
@Copilot Copilot AI requested a review from gewarren August 4, 2025 21:37
Copilot finished work on behalf of gewarren August 4, 2025 21:37
Copilot finished work on behalf of gewarren August 4, 2025 21:48
@Copilot Copilot AI requested a review from gewarren August 4, 2025 21:48
@gewarren gewarren requested a review from MihaZupan August 4, 2025 21:50
Copy link
Member

@MihaZupan MihaZupan left a comment

Choose a reason for hiding this comment

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

Thanks

@MihaZupan MihaZupan marked this pull request as ready for review August 4, 2025 22:19
@MihaZupan MihaZupan requested a review from a team as a code owner August 4, 2025 22:19
@gewarren gewarren merged commit 6a44eab into main Aug 4, 2025
5 checks passed
@gewarren gewarren deleted the copilot/fix-11626 branch August 4, 2025 22:21
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.

Incorrect remarks for System.UriBuilder.Scheme property
3 participants