From c1dd5b5176813d048654c66550a434ef30f96908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 17 Sep 2012 00:39:29 +0200 Subject: Add the private set_bindings/4 function used by cowboy_protocol --- src/cowboy_req.erl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/cowboy_req.erl') diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl index aad6a97..acee88b 100644 --- a/src/cowboy_req.erl +++ b/src/cowboy_req.erl @@ -107,6 +107,7 @@ -export([set_connection/2]). -export([add_header/3]). -export([set_buffer/2]). +-export([set_bindings/4]). %% Misc API. -export([compact/1]). @@ -941,6 +942,13 @@ add_header(Name, Value, Req=#http_req{headers=Headers}) -> set_buffer(Buffer, Req) -> Req#http_req{buffer=Buffer}. +%% @private +-spec set_bindings(cowboy_dispatcher:tokens(), cowboy_dispatcher:tokens(), + cowboy_dispatcher:bindings(), Req) -> Req when Req::req(). +set_bindings(HostInfo, PathInfo, Bindings, Req) -> + Req#http_req{host_info=HostInfo, path_info=PathInfo, + bindings=Bindings}. + %% Misc API. %% @doc Compact the request data by removing all non-system information. -- cgit v1.2.3