Add hostname conformance case for a 253-character name with a trailing dot - #513
Merged
rodaine merged 1 commit intoJul 27, 2026
Conversation
…g dot The hostname docs say the name can be 253 characters at most, excluding the optional trailing dot, so a 253-character name followed by a dot is valid. There was no case covering that edge. Adds valid/name_253_characters_plus_ trailing_dot next to the existing valid/name_253_characters case, using the same value with a trailing dot and expecting success. Refs bufbuild#512.
rodaine
approved these changes
Jul 27, 2026
Member
|
Thanks for the patch! If you'd like to also contribute any implementation patches, that would also be appreciated 😁 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds one conformance case,
valid/name_253_characters_plus_trailing_dot, incases_is_hostname.go, right after the existingvalid/name_253_characterscase. It uses that same 253-character value with a trailing dot appended (254 bytes total) and expects success.The
hostnamedocs invalidate.protosay the name can be 253 characters at most, excluding the optional trailing dot, so a 253-character name followed by a dot should be valid. There was no case for that edge, and it turns out the runtimes reject it because the length check counts the trailing dot. This was confirmed in #512.As discussed there, the case will fail against the current runtimes until they strip the trailing dot before the length check. Those fixes come separately, so this PR is just the conformance case.
Refs #512