aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-06-21 19:03:18 +0200
committerLoïc Hoguin <[email protected]>2016-06-21 19:03:18 +0200
commit3a7643782edd56dad7cf641d150bcef35399f33f (patch)
tree8277f4bbef24a04083aa9f3fc449a37ceba6a64e /src
parentd9cad866f2398fb9d30e8c2ff6d053b90a034098 (diff)
downloadcowboy-3a7643782edd56dad7cf641d150bcef35399f33f.tar.gz
cowboy-3a7643782edd56dad7cf641d150bcef35399f33f.tar.bz2
cowboy-3a7643782edd56dad7cf641d150bcef35399f33f.zip
Remove cowboy_req:new/14
This internal function is no longer necessary.
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_req.erl31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl
index 48e4c93..121f747 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -16,7 +16,6 @@
-module(cowboy_req).
%% Request API.
--export([new/14]).
-export([method/1]).
-export([version/1]).
-export([peer/1]).
@@ -157,36 +156,6 @@
%% Request API.
--spec new(any(), module(),
- undefined | {inet:ip_address(), inet:port_number()},
- binary(), binary(), binary(),
- cowboy:http_version(), cowboy:http_headers(), binary(),
- inet:port_number() | undefined, binary(), boolean(), boolean(),
- undefined | cowboy:onresponse_fun())
- -> req().
-new(Socket, Transport, Peer, Method, Path, Query,
- Version, Headers, Host, Port, Buffer, CanKeepalive,
- Compress, OnResponse) ->
- Req = #http_req{socket=Socket, transport=Transport, pid=self(), peer=Peer,
- method=Method, path=Path, qs=Query, version=Version,
- headers=Headers, host=Host, port=Port, buffer=Buffer,
- resp_compress=Compress, onresponse=OnResponse},
- case CanKeepalive of
- false ->
- Req#http_req{connection=close};
- true ->
- case parse_header(<<"connection">>, Req) of
- undefined ->
- case Version of
- 'HTTP/1.1' -> Req; %% keepalive
- 'HTTP/1.0' -> Req#http_req{connection=close}
- end;
- Tokens ->
- Connection = connection_to_atom(Tokens),
- Req#http_req{connection=Connection}
- end
- end.
-
-spec method(req()) -> binary().
method(#{method := Method}) ->
Method.