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

fix issue 716 #717

Merged
merged 4 commits into from
Aug 22, 2024
Merged

fix issue 716 #717

merged 4 commits into from
Aug 22, 2024

Conversation

lemire
Copy link
Member

@lemire lemire commented Aug 22, 2024

fixes #716

@lemire lemire requested a review from anonrig August 22, 2024 15:10
@anonrig
Copy link
Member

anonrig commented Aug 22, 2024

It seems web-platform tests are failing with this change

include/ada/url-inl.h Outdated Show resolved Hide resolved
@lemire
Copy link
Member Author

lemire commented Aug 22, 2024

@anonrig My fix is not correct.

@lemire
Copy link
Member Author

lemire commented Aug 22, 2024

@anonrig Annoyingly, it seems that we have to check for negative values separately. :-/ Latest commit should be correct.

@@ -215,10 +215,15 @@ inline void url::copy_scheme(const ada::url &u) {
ada_really_inline size_t url::parse_port(std::string_view view,
bool check_trailing_content) noexcept {
ada_log("parse_port('", view, "') ", view.size());
if (!view.empty() && view[0] == '-') {
Copy link
Member

Choose a reason for hiding this comment

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

Should we add ada_unlikely to here?

@anonrig anonrig merged commit c32a637 into main Aug 22, 2024
36 checks passed
@anonrig anonrig deleted the issue716 branch August 22, 2024 16:45
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.

Negative port is silently ignored
3 participants