Serving non-standard HTTP method with ExpressJS

前端 未结 3 1033
我在风中等你
我在风中等你 2021-01-05 05:57

I would like to write an HTTP server that answer to request using a non-standard HTTP method (verb). For instance, the client would make a request like FOO / HTTP/.1.1

3条回答
  •  梦毁少年i
    2021-01-05 06:44

    Node has a hard-coded whitelist of acceptable HTTP verbs in C.

    In order to accept custom verbs, you must modify the HTTP parser and recompile node.


    You mentioned that you're trying to implement PURGE, which was added to the whitelist in v0.7.5.

提交回复
热议问题