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

Failing Web Platform Tests: urlencoded-parser.any.js due to invalid HTTP method #3453

Open
npaun opened this issue Feb 3, 2025 · 2 comments

Comments

@npaun
Copy link
Member

npaun commented Feb 3, 2025

We're currently failing a lot of the WPT tests for url encoding, not because we're doing anything wrong with regard to url encoding, but because we disallow the made-up HTTP method they're using:

    let init = new Request("about:blank", { body: val.input, method: "LADIDA", headers: {"Content-Type": "application/x-www-form-urlencoded;charset=windows-1252"} }).formData()

We don't need to take any action now, but I'm just raising this as a data point for allowing arbitrary method names.

cc: @jasnell, @kentonv

@kentonv
Copy link
Member

kentonv commented Feb 3, 2025

This would require some deep changes to the KJ HTTP implementation, which uses an enum for HTTP methods. Meanwhile, to my knowledge no one has ever requested support for method names outside our list, so changing it just for some contrived tests feels like a tough sell.

I wonder if we could just... add LADIDA to the enum... lol.

@jasnell
Copy link
Member

jasnell commented Feb 3, 2025

... Meanwhile, to my knowledge no one has ever requested support for method names outside our list

If we can use Node.js' past history here as a guide... folks are simply unlikely to ask. Folks would just try, see that it wouldn't work, then go do something else instead. It wasn't until after we enabled arbitrary http method that we actually started to see folks trying to use them.

In any case, I don't think this is actionable at all right now (or even needs to be). The wpt test in question can just be skipped.

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

No branches or pull requests

3 participants