0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00
Commit graph

2158 commits

Author SHA1 Message Date
Loïc Hoguin
408f167621 Move the reply function to cowboy_http_req. 2011-03-18 22:38:26 +01:00
Loïc Hoguin
c6ad0273a8 Introduce Handler:terminate to cleanup the handler's state. 2011-03-18 13:47:37 +01:00
Loïc Hoguin
5e80e4baac Handler:init/2 should also return the Request in case it changed. 2011-03-18 01:52:46 +01:00
Loïc Hoguin
f53235549d Introduce Handler:init/2 for initializing the handler state.
We need an init function in order to process upgrade instructions
for protocols like WebSockets, but also to request an active receive
mode for long-polling connections, both of which will be implemented
at a later time.
2011-03-18 00:15:46 +01:00
Loïc Hoguin
a77b906b9f Don't crash on Transport:controlling_process return in the acceptor.
Crashes can happen if we close the connection too fast, leading to
controlling_process returning {error, closed} instead of ok. This can
happen when we receive bad requests, reply with 404 Not Found and more.
Simply do not match the return value of controlling_process to avoid this.
2011-03-17 22:22:09 +01:00
Loïc Hoguin
0069e2465d Remove a superfluous terminate call in error_terminate. 2011-03-17 22:06:39 +01:00
Loïc Hoguin
786a05a129 Run the dispatcher as early as possible to quickly dismiss 404 errors. 2011-03-17 22:02:47 +01:00
Loïc Hoguin
da72255940 Initial commit. 2011-03-17 00:29:35 +01:00