Skip to content

Undici does not like lowercase method names #2079

@dglozic

Description

@dglozic

Bug Description

When using request with lowercase method (say, put) undici accepts the method name but nginx complains about it and throws error 400.

Reproducible By

Make a request call by explicitly specifying method property as lowercase (say, put).

Expected Behavior

Method names should be case-insensitive.

Logs & Screenshots

Error from nginx proxy when put is used:

2023/04/17 14:48:42 [info] 36173#0: *119 client sent invalid method while reading client request line, client: 127.0.0.1, server: 127.0.0.1:9442, request: "put /v2/user_profiles/johndoe@acme.com/reload HTTP/1.1"

Environment

Using Node.js v18.14.2, and the latest version of undici.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions