diff options
author | Loïc Hoguin <[email protected]> | 2012-09-17 00:58:02 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2012-09-17 13:57:29 +0200 |
commit | 58edd4c35a0490701a87d94676a63c87e8dec8a0 (patch) | |
tree | 1e9ce74ffe5c4201cd5a61bfd456ad0412de5257 /src/cowboy_req.erl | |
parent | cf0e905c52dbd6ada6c260b5e95a78f3cc59d558 (diff) | |
download | cowboy-58edd4c35a0490701a87d94676a63c87e8dec8a0.tar.gz cowboy-58edd4c35a0490701a87d94676a63c87e8dec8a0.tar.bz2 cowboy-58edd4c35a0490701a87d94676a63c87e8dec8a0.zip |
Add the private get_connection/1 function used by cowboy_protocol
This removes cowboy_protocol's dependency on http.hrl!
Diffstat (limited to 'src/cowboy_req.erl')
-rw-r--r-- | src/cowboy_req.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl index e067ea5..98fc895 100644 --- a/src/cowboy_req.erl +++ b/src/cowboy_req.erl @@ -110,6 +110,7 @@ -export([set_bindings/4]). -export([get_resp_state/1]). -export([get_buffer/1]). +-export([get_connection/1]). %% Misc API. -export([compact/1]). @@ -961,6 +962,11 @@ get_resp_state(#http_req{resp_state=RespState}) -> get_buffer(#http_req{buffer=Buffer}) -> Buffer. +%% @private +-spec get_connection(req()) -> keepalive | close. +get_connection(#http_req{connection=Connection}) -> + Connection. + %% Misc API. %% @doc Compact the request data by removing all non-system information. |