aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_req.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-09-17 00:30:54 +0200
committerLoïc Hoguin <[email protected]>2012-09-17 13:57:28 +0200
commit5b56dd780bfeddac96ae8360bd5b352e427e1b3d (patch)
treeee3480737879d3237f9f032b740cca9a3250ed21 /src/cowboy_req.erl
parentfc02b7f767516116167fb98b28d69805e48dbd23 (diff)
downloadcowboy-5b56dd780bfeddac96ae8360bd5b352e427e1b3d.tar.gz
cowboy-5b56dd780bfeddac96ae8360bd5b352e427e1b3d.tar.bz2
cowboy-5b56dd780bfeddac96ae8360bd5b352e427e1b3d.zip
Add the private set_buffer/2 function used by cowboy_protocol
Diffstat (limited to 'src/cowboy_req.erl')
-rw-r--r--src/cowboy_req.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl
index d074efa..aad6a97 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -106,6 +106,7 @@
-export([set_host/4]).
-export([set_connection/2]).
-export([add_header/3]).
+-export([set_buffer/2]).
%% Misc API.
-export([compact/1]).
@@ -935,6 +936,11 @@ set_connection(RawConnection, Req=#http_req{headers=Headers}) ->
add_header(Name, Value, Req=#http_req{headers=Headers}) ->
Req#http_req{headers=[{Name, Value}|Headers]}.
+%% @private
+-spec set_buffer(binary(), Req) -> Req when Req::req().
+set_buffer(Buffer, Req) ->
+ Req#http_req{buffer=Buffer}.
+
%% Misc API.
%% @doc Compact the request data by removing all non-system information.