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

Parsing application/x-www-form-urlencoded byte sequence is infallible #1798

Closed
F3n67u opened this issue Dec 16, 2024 · 1 comment · Fixed by #1799
Closed

Parsing application/x-www-form-urlencoded byte sequence is infallible #1798

F3n67u opened this issue Dec 16, 2024 · 1 comment · Fixed by #1799

Comments

@F3n67u
Copy link

F3n67u commented Dec 16, 2024

What is the issue with the Fetch Standard?

https://fetch.spec.whatwg.org/#dom-body-formdata

In "The formData() method steps":

"application/x-www-form-urlencoded"

  1. Let entries be the result of parsing bytes.
  2. If entries is failure, then throw a TypeError.
  3. Return a new FormData object whose entry list is entries.

Step 2 seems not necessary because parsing application/x-www-form-urlencoded byte sequence is infallible: https://url.spec.whatwg.org/#concept-urlencoded-parser

@annevk
Copy link
Member

annevk commented Dec 18, 2024

Nice find! Seems this has always been wrong: 6a9ae23. (And I checked the URL standard which got the definition from the HTML standard about twelve years ago, a move I was responsible for as well, and that never returned failure either.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants