Hacker News new | ask | show | jobs
by sandfox 4685 days ago
It should probably be noted that: a) you don't have use node's built in HTTP server (yeah, I know, nearly everyone will), you are more thn free to write your own or use one from it's module repository (npm) b) The entire HTTP module is currently being over-hauled in the 0.11.X development branch and the changes should appear in the stable 0.12.x releases.

Out of interest has anyone seen what other web servers support for these more 'esoteric' verbs is like?

5 comments

Built-in Go HTTP Server:

https://gist.github.com/NickPresta/6276195

It seems to pass the correct method to the application.

Cowboy is roughly verb-agnostic (though REST verbs have special support: http://ninenines.eu/docs/en/cowboy/HEAD/guide/rest_handlers)
For clarification (I assume you know this but the wording was a bit ambiguous) there are extra handlers that you can use to get some nice behaviour, but you don't have to use any of them. It doesn't add the 'magic' unless you explicitly turn it on (i.e. choose the rest handlers).
For most of 2004, nginx didn't handle POST, either:

http://trac.nginx.org/nginx/browser/nginx/src/http/ngx_http_...

Ah, the POTT method. Perhaps it's part of the HTCPCP?[0]

[0]: http://en.wikipedia.org/wiki/Hyper_Text_Coffee_Pot_Control_P...

True though it does return an invalid method.
> The entire HTTP module is currently being over-hauled

Is there a discussion about that somewhere? The public repo still uses the HTTP_METHOD_MAP macros.

https://github.com/joyent/node/blob/v0.11.5-release/src/node...

gunicorn doesn't have the remapping issues of node and is significantly more verb-agnostic, but it will not handle many valid HTTP verbs: https://github.com/benoitc/gunicorn/blob/master/gunicorn/htt...