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:
parent
07078eb47b
commit
a8335c63df
11 changed files with 25 additions and 11 deletions
|
@ -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, #{}).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue