fix(url): handle tab/newline-only inputs in set_port#961
Merged
anonrig merged 2 commits intoada-url:mainfrom Jun 27, 2025
Merged
fix(url): handle tab/newline-only inputs in set_port#961anonrig merged 2 commits intoada-url:mainfrom
anonrig merged 2 commits intoada-url:mainfrom
Conversation
Member
|
My reading of the spec is as follows:
So I think @watilde is correct. Anything non-empty that does not parse to a 16-bit integer should leave the port unchanged. |
lemire
approved these changes
Jun 26, 2025
Member
lemire
left a comment
There was a problem hiding this comment.
I think it is a genuine bug worth fixing.
Member
|
I'll wait for @anonrig to react before we merge. |
anonrig
approved these changes
Jun 26, 2025
anonrig
approved these changes
Jun 27, 2025
Member
|
It seems there are linting errors |
Contributor
Author
|
Working on fixing the lint errors. I’ll push the changes shortly. |
b332e07 to
47b7cef
Compare
Contributor
Author
|
I ran clang-format to fix the lint errors, amended the previous commit, and force-pushed to keep the commit history clean. |
anonrig
approved these changes
Jun 27, 2025
Member
|
Thank you for your contribution |
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 change updates set_port so that when the input consists only of tab (\t), newline (\n), or carriage return characters, the port is left unchanged. Also adds these cases to ada_extra_setters_tests.json while waiting for their inclusion in WPT.
Refs: web-platform-tests/wpt#53420