diff options
author | Loïc Hoguin <[email protected]> | 2014-11-07 20:19:05 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-11-07 20:19:05 +0200 |
commit | 999dc5b7c1665fb620c14f6303610793313efe58 (patch) | |
tree | 8371be2957e20b40fa9b5b93c63e414510e93c2e /doc/src/guide | |
parent | 8cbd8c1882e33380875f2723cad258784ba3a360 (diff) | |
download | cowboy-999dc5b7c1665fb620c14f6303610793313efe58.tar.gz cowboy-999dc5b7c1665fb620c14f6303610793313efe58.tar.bz2 cowboy-999dc5b7c1665fb620c14f6303610793313efe58.zip |
Rename 'halt' to 'stop' for better consistency
Now everywhere in Cowboy when we want to stop something we return
a 'stop' tuple instead of one of the many choices depending on
context that we had before.
This particular change affects middlewares, sub protocols and
REST handlers which were using 'halt' to stop processing.
Diffstat (limited to 'doc/src/guide')
-rw-r--r-- | doc/src/guide/middlewares.ezdoc | 2 | ||||
-rw-r--r-- | doc/src/guide/rest_handlers.ezdoc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/src/guide/middlewares.ezdoc b/doc/src/guide/middlewares.ezdoc index 0c142f9..35e9ea9 100644 --- a/doc/src/guide/middlewares.ezdoc +++ b/doc/src/guide/middlewares.ezdoc @@ -23,7 +23,7 @@ Middlewares can return one of four different values: * `{ok, Req, Env}` to continue the request processing * `{suspend, Module, Function, Args}` to hibernate -* `{halt, Req}` to stop processing and move on to the next request +* `{stop, Req}` to stop processing and move on to the next request Of note is that when hibernating, processing will resume on the given MFA, discarding all previous stacktrace. Make sure you keep the `Req` diff --git a/doc/src/guide/rest_handlers.ezdoc b/doc/src/guide/rest_handlers.ezdoc index 1868f0a..e09790a 100644 --- a/doc/src/guide/rest_handlers.ezdoc +++ b/doc/src/guide/rest_handlers.ezdoc @@ -41,7 +41,7 @@ you need. All callbacks take two arguments, the Req object and the State, and return a three-element tuple of the form `{Value, Req, State}`. -All callbacks can also return `{halt, Req, State}` to stop execution +All callbacks can also return `{stop, Req, State}` to stop execution of the request. The following table summarizes the callbacks and their default values. |