aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-03-19 17:42:03 +0100
committerLoïc Hoguin <[email protected]>2011-03-19 17:42:03 +0100
commit2c52a30b0a209cfb0814a42b814271b168ddb2e2 (patch)
tree5991a067ba529f2c7a5dbc70b6334dbecff7a18e /README.md
parentebe638165e5a5285ae595c9e0ae07b3dd919881b (diff)
downloadcowboy-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.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index 2390abb..b08e36c 100644
--- a/README.md
+++ b/README.md
@@ -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,