0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 20:50:24 +00:00

Add the private get_connection/1 function used by cowboy_protocol

This removes cowboy_protocol's dependency on http.hrl!
This commit is contained in:
Loïc Hoguin 2012-09-17 00:58:02 +02:00
parent cf0e905c52
commit 58edd4c35a
2 changed files with 8 additions and 3 deletions

View file

@ -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.