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

Correct condition for opaque paths in base URL #243

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

anonrig
Copy link
Contributor

@anonrig anonrig commented Jan 6, 2025

This fixes one of the test conditions. Relevant Ada URL change ada-url/ada@da9a991

Fixes #240

cc @jeremyroman @sisidovski

@jeremyroman
Copy link
Collaborator

jeremyroman commented Jan 6, 2025

Thanks very much. A couple minor procedural things before I merge this:

  1. Please tweak the commit message according to WHATWG style. It's a little debatable, but I'd consider this editorial because all existing implementations and the tests already work in the way this is corrected to, and was apparently intended to, read. So, something like "Editorial: Correct condition for opaque paths in base URL", and add some text to the commit description clarifying that it was inverted, and this makes it match existing implemented and tested behavior.
  2. It looks like the IPR bot is recognizing you as having signed as an individual, but I think the policy might require you to be recognized as a Cloudflare employee unless given an exception by the steering group. It looks like Cloudflare does participate as an organization, so it might be appropriate for you to get added to the cloudflare-whatwg organization to reflect that. On the other hand, if you think individual participation is appropriate here, let me double-check with internal experts.

@jeremyroman
Copy link
Collaborator

(the build failures look unrelated and due to various validation checks tightening up since the last time we made changes, so you can ignore those)

Copy link
Collaborator

@sisidovski sisidovski left a comment

Choose a reason for hiding this comment

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

LGTM w/ Jeremy's comment.

I'm not fully confident how we should handle opaque path here, but for now this change makes sense and it matches existing implementations.

@domenic
Copy link
Member

domenic commented Jan 7, 2025

FWIW we usually treat spec bug fixes as non-editorial, even if the fix is to match the existing intent.

@jeremyroman
Copy link
Collaborator

jeremyroman commented Jan 7, 2025

Alright, in that case the "Editorial:" prefix should be omitted and the pull request template (https://github.com/whatwg/urlpattern/blob/main/PULL_REQUEST_TEMPLATE.md) should be used even though the answers will basically all be n/a. (I can confirm that Chromium supports this fix.)

@annevk
Copy link
Member

annevk commented Jan 7, 2025

We treat it as non-editorial for the purposes of writing the commit message, but if tests and existing implementations are already aligned there's no need to go through the extra trouble of the template.

@anonrig anonrig changed the title use correct base url opaque path condition Correct condition for opaque paths in base URL Jan 7, 2025
This PR fixes pathname processing for inputs that have opaque pathnames.
@anonrig
Copy link
Contributor Author

anonrig commented Jan 7, 2025

Thanks very much. A couple minor procedural things before I merge this:

  1. Please tweak the commit message according to WHATWG style. It's a little debatable, but I'd consider this editorial because all existing implementations and the tests already work in the way this is corrected to, and was apparently intended to, read. So, something like "Editorial: Correct condition for opaque paths in base URL", and add some text to the commit description clarifying that it was inverted, and this makes it match existing implemented and tested behavior.

I've updated the commit message and description. Let me know if you need any further changes.

  1. It looks like the IPR bot is recognizing you as having signed as an individual, but I think the policy might require you to be recognized as a Cloudflare employee unless given an exception by the steering group. It looks like Cloudflare does participate as an organization, so it might be appropriate for you to get added to the cloudflare-whatwg organization to reflect that. On the other hand, if you think individual participation is appropriate here, let me double-check with internal experts.

I've reached out to @kentonv to join the organization.

@jeremyroman jeremyroman merged commit 6e35062 into whatwg:main Jan 7, 2025
1 of 2 checks passed
@anonrig anonrig deleted the fix-opaque-path branch January 7, 2025 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Why does this test succeed with pathname "/foo/bar"?
5 participants