Does inets and httpd support OPTION requests and why can't my custom module add this functionality?

By looking at source, httpd_request_handler:handle_http_msg/2 will call httpd_request:validate/3 which will return an error, resulting in status 501 being returned to the client. I think this is happening before using any of your modules so that is why you can’t implement a handler module.

Maybe there is some implementation issue with this method. I see that method CONNECT is also missing in the httpd_request:validate/3 clauses, even though it exists in HTTP 1.1.

FWIW: OPTION is supported in httpc, and CONNECT is missing in both httpd and httpc (actually, CONNECT is used internally in httpc, but is not allowed for calling through httpc:request/5).

There are some other problems with httpd: No support for multiple headers and No cookie support in standalone mode, these might save your time in the future.

Would like to hear from OTP team, I’m interested in collaborating if someone can say whether this should be solved or not.

2 Likes