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

16 commits

Author SHA1 Message Date
Loïc Hoguin
99df823cc3
Document stopping the listener in App:stop/1 2019-10-03 10:09:35 +02:00
Loïc Hoguin
6f7b59886e
Remove NumAcceptors argument from start_clear/tls
They are now cowboy:start_clear/3 and cowboy:start_tls/3.
The NumAcceptors argument can be specified via the
num_acceptor transport option. Ranch has been updated
to 1.4.0 to that effect.
2017-06-07 15:15:54 +02:00
Loïc Hoguin
352cfce663 Fix markdown_middleware example 2016-06-13 17:35:26 +02:00
Loïc Hoguin
ec82e3548b Simplify specifying the Cowboy version in examples 2016-01-14 22:58:22 +01:00
Loïc Hoguin
cf44496005 Remove the .app.src file in all examples 2016-01-14 20:56:31 +01:00
Loïc Hoguin
394b4f0bf7 Simplify example instructions and fix broken examples
Also convert to AsciiDoc while we're at it.
2016-01-14 20:00:50 +01:00
Loïc Hoguin
18f50b8697 Make examples use Cowboy master 2014-10-03 16:28:02 +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
62de3a62f9 Update to erlang.mk 1.0.0 2014-08-01 14:26:51 +02:00
Loïc Hoguin
abcc6e96d8 Update erlang.mk and update paths to start the release
Fixes a couple invalid instructions at the same time.
2014-06-30 10:14:05 +02:00
Loïc Hoguin
6672ea0415 Review, improve and document the static files handler
Changes include:

 *  Much simplified route configuration.

 *  Etag generation is now enabled by default.

 *  Web mimetypes are now detected by default. A bigger list of
    mimetypes can be detected without any additional library.

 *  Mimetypes can no longer be specified as a list. Copying this
    list for new connections is too costy. You can easily convert
    it into a function and pass that function to the handler instead.

 *  You can however specify a single hardcoded mimetype. Mostly
    useful when serving a single file, like an index.html file,
    to avoid extra operations.

 *  Specifying a path as a list of tokens is not possible anymore.
    Use either a binary or a string.

 *  Using a private directory will not work if the application
    was not started properly. Cowboy will not attempt to find
    the location of this directory if the VM doesn't know it,
    as this caused issues in some setups.

 *  Overall the code has been much simplified and clarified,
    and of course has now been documented.
2013-11-02 14:41:46 +01:00
Loïc Hoguin
96755dd973 No need for relx in path for examples anymore 2013-10-22 09:14:32 +02:00
Loïc Hoguin
36ba174224 Convert the markdown_middleware example to a release 2013-10-22 09:10:24 +02:00
Loïc Hoguin
1a4e7a8618 Fix the list of registered processes in the examples 2013-09-09 16:46:21 +02:00
Loïc Hoguin
4a30198f90 Make cowlib a proper dependency
Start moving a few functions from Cowboy into cowlib.
2013-09-04 19:24:54 +02:00
Adam Cammack
09f1a8d55b Add an example with custom middleware 2013-02-09 13:54:08 -06:00