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(URLPattern): Handle search parameters correctly in URLPattern with base URL #24639

Conversation

yazan-abdalrahman
Copy link
Contributor

Ensure that URLPattern correctly parses and matches URLs with search parameters when a base URL is provided. This fixes the discrepancy where URLPattern in Deno was returning null for URLs with search parameters, unlike the behavior observed in Chrome.

  • Adjusted URLPattern parsing to include search parameters when matching against base URLs.

Fixes #24266

Ensure that URLPattern correctly parses and matches URLs with search parameters when a base URL is provided. This fixes the discrepancy where URLPattern in Deno was returning null for URLs with search parameters, unlike the behavior observed in Chrome.

- Adjusted URLPattern parsing to include search parameters when matching against base URLs.

Fixes denoland#24266
@crowlKats
Copy link
Member

@yazan-abdalrahman thank you for the PR, however the proper fix would be upstream in rust-urlpattern, and needs checking with the specification where we are actually wrong.
I will take a deeper look on sunday or monday.

@yazan-abdalrahman
Copy link
Contributor Author

@crowlKats
I will take a look also

@yazan-abdalrahman
Copy link
Contributor Author

@crowlKats
I found the issue, which is with the UrlPatternInit constructor. I made the necessary changes, but certain tests failed because the behavior changed. I will fix it and push a pull request for review.

@yazan-abdalrahman
Copy link
Contributor Author

yazan-abdalrahman commented Jul 22, 2024

@crowlKats
please check this PR and read my comment
denoland/rust-urlpattern#49

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.

URLPattern with search parameters and base url doesn't work
2 participants