Repository navigation
Data URLs can't have query params #54944
Description
Activity
- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.loadersIssues and PRs related to ES module loaders.Issues and PRs related to ES module loaders.fetchIssues and PRs related to the Fetch API.Issues and PRs related to the Fetch API.
on Sep 14, 2024 - removedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.
on Sep 14, 2024 The parser is correct here. It doesn't work in Chrome or Firefox nor could I find anywhere in the spec that says to treat query params separately from the body.
If I'm wrong please correct me.
Treating query params separately creates a myriad of issues that moving to a dedicated parser aimed to fix; should the question mark in
data:text/javascript;console.log('?')be treated as a query param?Reacted by Aviv KellerShouldn't that PR become semver-major, as it modifies the existing behavior?
I'd consider it a bug fix so not a semver-major change, we've done this a few times in undici. @nodejs/web-standards
Someone reported the old behavior as a bug: #53775
It's always tricky to decide whether any change qualifies as a bug fix or as a breaking change (cf XKCD 1172). Do you have a use case for having a query parameter?
Reacted by Khafra and Benjamin GruenbaumDo you have a use case for having a query parameter?
Not really, I just noticed that this behavior was different in the
mainbranch than the latest release when preparing #54933, and I figured it should be a non-patch change when sent to release lines.IMO we should treat it as a bug fix (i.e. semver-patch): if there’s no use case for it, then it’s not going to break anyone — and it’s going to unbreak a few folks
Reacted by Aviv Keller and Mattias Buelens
Version
mainPlatform
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Everytime
What is the expected behavior? Why is that the expected behavior?
The Data URL should load correctly, printing the
import.meta.urlwith the queryWhat do you see instead?
Additional information
I believe this is due to #54748 (CC @KhafraDev)