Skip to content

Support for 'QUERY' method #51562

Description

@evert

Version

v20.10.0

Platform

Linux evertbook6f 6.6.11-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jan 10 19:25:59 UTC 2024 x86_64 GNU/Linux

Subsystem

node:http

What steps will reproduce the bug?

The QUERY http method has a fair bit of interest and will likely at some point get standardized. There's a draft here:

https://www.ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-02.html

Currently (as far as I'm aware) it's not possible to define custom methods in the Node http package, preventing users from testing with this. Although I understand this was probably done for parser performance reasons, HTTP does have an explicit extension mechanism for new methods and recommendations on how to treat unknown ones, so I do feel it goes a bit counter against the spirit of HTTP to not allow new methods. Browsers will for example let users use any (unregistered) http method in fetch().

That said, I understand that supporting any unknown HTTP method is probably a lot of work, so I'll settle for having support for the QUERY http method!

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior? Why is that the expected behavior?

No response

What do you see instead?

Currently Node returns a 400 Bad Request

Additional information

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.http_parserIssues and PRs related to the HTTP parser implementation or http_parser binding.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions