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

23 commits

Author SHA1 Message Date
Loïc Hoguin
6fd2cadb1d Update ROADMAP 2014-10-04 13:26:40 +03:00
Loïc Hoguin
4bc8e330fa Remove the REST known_content_type callback
This callback was simply useless.
2014-10-03 18:52:14 +03:00
Loïc Hoguin
5ce4c2bfb4 Unify the init and terminate callbacks
This set of changes is the first step to simplify the
writing of handlers, by removing some extraneous
callbacks and making others optional.

init/3 is now init/2, its first argument being removed.

rest_init/2 and rest_terminate/2 have been removed.

websocket_init/3 and websocket_terminate/3 have been removed.

terminate/3 is now optional. It is called regardless of
the type of handler, including rest and websocket.

The return value of init/2 changed. It now returns
{Mod, Req, Opts} with Mod being either one of the four
handler type or a custom module. It can also return extra
timeout and hibernate options.

The signature for sub protocols has changed, they now
receive these extra timeout and hibernate options.

Loop handlers are now implemented in cowboy_long_polling,
and will be renamed throughout the project in a future commit.
2014-09-26 15:58:44 +03:00
Loïc Hoguin
c56bada509 Remove the error tuple return value for middlewares
It wasn't interesting compared to simply returning a halt tuple
with an explicit reply.
2014-09-24 15:03:10 +03:00
Loïc Hoguin
aa4d86b81f Remove the onrequest hook
It was redundant with middlewares. Allows us to save a few operations
for every incoming requests.
2014-09-24 14:39:17 +03:00
Loïc Hoguin
f1c3b6d76f Breaking update of the cowboy_req interface
Simplify the interface for most cowboy_req functions. They all return
a single value except the four body reading functions. The reply functions
now only return a Req value.

Access functions do not return a Req anymore.

Functions that used to cache results do not have a cache anymore.

The interface for accessing query string and cookies has therefore
been changed.

There are now three query string functions: qs/1 provides access
to the raw query string value; parse_qs/1 returns the query string
as a list of key/values; match_qs/2 returns a map containing the
values requested in the second argument, after applying constraints
and default value.

Similarly, there are two cookie functions: parse_cookies/1 and
match_cookies/2. More match functions will be added in future commits.

None of the functions return an error tuple anymore. It either works
or crashes. Cowboy will attempt to provide an appropriate status code
in the response of crashed handlers.

As a result, the content decode function has its return value changed
to a simple binary, and the body reading functions only return on success.
2014-09-23 16:43:29 +03:00
Loïc Hoguin
03d8131f2a Remove 1.0 section in the ROADMAP 2014-08-01 14:43:04 +02:00
Loïc Hoguin
de4697690c Small addition to the ROADMAP 2014-07-12 12:11:24 +02:00
Loïc Hoguin
d38c064f73 Small addition to 2.0 roadmap 2014-07-07 14:14:36 +02:00
Loïc Hoguin
e6473ba3ea Add note about httpbis to the roadmap 2014-06-30 17:51:01 +02:00
Loïc Hoguin
bc3b122e89 Forgot a todo in the ROADMAP 2014-06-30 16:21:27 +02:00
Loïc Hoguin
e40c2c33c5 Roadmap for Cowboy 2.0 2014-06-30 16:07:46 +02:00
Loïc Hoguin
0a27247a91 Update CHANGELOG and ROADMAP 2014-06-10 12:00:30 +02:00
Loïc Hoguin
d87192b0ed Update ROADMAP 2013-11-14 15:34:16 +01:00
Loïc Hoguin
8754f7636c Small roadmap update 2013-09-18 20:29:01 +02:00
Loïc Hoguin
7eca879043 Update ROADMAP 2013-05-24 14:59:30 +02:00
Loïc Hoguin
bc743a3ea5 Add a REST point on the roadmap 2013-02-11 09:37:55 +01:00
Loïc Hoguin
fd8ec6aaf3 Update roadmap 2013-01-29 01:19:49 +01:00
Loïc Hoguin
181d0edc52 Small Markdown fixes to better follow the specs 2012-12-07 16:19:08 +01:00
Loïc Hoguin
1f9d71c3f5 Update ROADMAP.md 2012-10-05 00:29:34 +02:00
Loïc Hoguin
0c2e2224e3 Update version to 0.6.0
Also update the CHANGELOG and copyright years.
2012-05-23 14:53:48 +02:00
Loïc Hoguin
8363e8995a Small updates to the ROADMAP and doc comments 2012-05-21 08:49:22 +02:00
Loïc Hoguin
8f0a78f52f Add a roadmap 2012-02-27 09:54:16 +01:00