diff options
author | Loïc Hoguin <[email protected]> | 2011-03-19 17:42:03 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2011-03-19 17:42:03 +0100 |
commit | 2c52a30b0a209cfb0814a42b814271b168ddb2e2 (patch) | |
tree | 5991a067ba529f2c7a5dbc70b6334dbecff7a18e /README.md | |
parent | ebe638165e5a5285ae595c9e0ae07b3dd919881b (diff) | |
download | cowboy-2c52a30b0a209cfb0814a42b814271b168ddb2e2.tar.gz cowboy-2c52a30b0a209cfb0814a42b814271b168ddb2e2.tar.bz2 cowboy-2c52a30b0a209cfb0814a42b814271b168ddb2e2.zip |
Rewrite the dispatcher to take a list of host each having a list of paths.
* Makes more sense to parse the host only once instead of for each path.
* Allows proper handling of: If the host is not a valid host on the server,
the response MUST be a 400 (Bad Request) error.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -49,8 +49,8 @@ Code speaks more than words: application:start(cowboy), Dispatch = [ - %% Host, Path, Handler, Opts - {'_', '_', my_handler, []} + %% {Host, list({Path, Handler, Opts})} + {'_', [{'_', my_handler, []}]} ], %% NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts cowboy_listener_sup:start_link(100, |