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

Always dialyze tests and fix some cowboy_req specs

This commit is contained in:
Loïc Hoguin 2018-10-31 10:50:57 +01:00
parent 07078eb47b
commit a8335c63df
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
11 changed files with 25 additions and 11 deletions

View file

@ -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, #{}).