aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-10-31 10:50:57 +0100
committerLoïc Hoguin <[email protected]>2018-10-31 10:50:57 +0100
commita8335c63df31f21d88e9d7d1f2b64d32a674cd7a (patch)
tree2c8adc564263b49621ed969e0e08976258a35ffa /src
parent07078eb47bfc2a774e4ce00d2a215c301f4f4ea7 (diff)
downloadcowboy-a8335c63df31f21d88e9d7d1f2b64d32a674cd7a.tar.gz
cowboy-a8335c63df31f21d88e9d7d1f2b64d32a674cd7a.tar.bz2
cowboy-a8335c63df31f21d88e9d7d1f2b64d32a674cd7a.zip
Always dialyze tests and fix some cowboy_req specs
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_req.erl6
-rw-r--r--src/cowboy_websocket.erl2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl
index 2857c75..dad923f 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -535,13 +535,13 @@ read_and_match_urlencoded_body(Fields, Req0, Opts) ->
%% Multipart.
-spec read_part(Req)
- -> {ok, cow_multipart:headers(), Req} | {done, Req}
+ -> {ok, cowboy:http_headers(), Req} | {done, Req}
when Req::req().
read_part(Req) ->
read_part(Req, #{length => 64000, period => 5000}).
-spec read_part(Req, read_body_opts())
- -> {ok, #{binary() => binary()}, Req} | {done, Req}
+ -> {ok, cowboy:http_headers(), Req} | {done, Req}
when Req::req().
read_part(Req, Opts) ->
case maps:is_key(multipart, Req) of
@@ -822,7 +822,7 @@ stream_trailers(Trailers, #{pid := Pid, streamid := StreamID, has_sent_resp := h
Pid ! {{Pid, StreamID}, {trailers, Trailers}},
ok.
--spec push(binary(), cowboy:http_headers(), req()) -> ok.
+-spec push(iodata(), cowboy:http_headers(), req()) -> ok.
push(Path, Headers, Req) ->
push(Path, Headers, Req, #{}).
diff --git a/src/cowboy_websocket.erl b/src/cowboy_websocket.erl
index 0e88fc4..913c116 100644
--- a/src/cowboy_websocket.erl
+++ b/src/cowboy_websocket.erl
@@ -31,7 +31,7 @@
-export([system_terminate/4]).
-export([system_code_change/4]).
--type commands() :: [cow_ws:frame()].
+-type commands() :: [cow_ws:frame() | {active, boolean()}].
-export_type([commands/0]).
-type call_result(State) :: {commands(), State} | {commands(), State, hibernate}.