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

Add fetch_standard_url compat flag #2114

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented May 11, 2024

Adds a compat flag that makes it so that the fetch('...') method variant that takes a URL string, the Request object constructor, and redirects will use the standard URL parser.

This is not really how I would prefer to address this since, unfortunately, this introduces a double parsing and serialization of the URL in order to minimize changes to the existing implementation. It would be nicer (and very possible) to refactor things to avoid the double parsing at some point.

Fixes: #1957

@jasnell jasnell requested review from a team as code owners May 11, 2024 00:25
Adds a compat flag that makes it so that the fetch('...') method
variant that takes a URL string, the `Request` object constructor,
and redirects will use the standard URL parser.

Unfortunately, this introduces a double parsing of the URL in order
to minimize changes to the existing implementation. It would be
nice to refactor things to avoid the double parsing at some point.
@jasnell jasnell force-pushed the jsnell/fetch-standard-url2 branch from 633952c to 938824a Compare May 14, 2024 23:21
@jasnell jasnell merged commit fa7f1c2 into main May 15, 2024
10 checks passed
@jasnell jasnell deleted the jsnell/fetch-standard-url2 branch May 15, 2024 00:28
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.

Fetch API is inconsistent with the browser/web API for URL starting with whitespaces
3 participants