aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Majorov <[email protected]>2013-01-26 00:30:08 +0400
committerAndrew Majorov <[email protected]>2013-01-26 02:37:43 +0400
commit0d93c96b31734e2309a45dc151c447beaf23f20f (patch)
tree6aed003ae16fd2f7bb86146cacd013b040dc287e
parentbcb1222df99f11a55159a591b75c6995905bd4b9 (diff)
downloadcowboy-0d93c96b31734e2309a45dc151c447beaf23f20f.tar.gz
cowboy-0d93c96b31734e2309a45dc151c447beaf23f20f.tar.bz2
cowboy-0d93c96b31734e2309a45dc151c447beaf23f20f.zip
Update handler callback specs
There is one another {upgrade, ...} quintuple allowed as the result of Handler:init call, somewhy not mentioned in the callback specifications.
-rw-r--r--src/cowboy_http_handler.erl1
-rw-r--r--src/cowboy_loop_handler.erl1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/cowboy_http_handler.erl b/src/cowboy_http_handler.erl
index 9c7aaa6..0393153 100644
--- a/src/cowboy_http_handler.erl
+++ b/src/cowboy_http_handler.erl
@@ -45,6 +45,7 @@
| {loop, Req, state(), timeout(), hibernate}
| {shutdown, Req, state()}
| {upgrade, protocol, module()}
+ | {upgrade, protocol, module(), Req, opts()}
when Req::cowboy_req:req().
-callback handle(Req, State) -> {ok, Req, State}
when Req::cowboy_req:req(), State::state().
diff --git a/src/cowboy_loop_handler.erl b/src/cowboy_loop_handler.erl
index 71323d2..f8d008f 100644
--- a/src/cowboy_loop_handler.erl
+++ b/src/cowboy_loop_handler.erl
@@ -51,6 +51,7 @@
| {loop, Req, state(), timeout(), hibernate}
| {shutdown, Req, state()}
| {upgrade, protocol, module()}
+ | {upgrade, protocol, module(), Req, opts()}
when Req::cowboy_req:req().
-callback info(any(), Req, State)
-> {ok, Req, State}