mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Add multipart support
This commit is contained in:
parent
a5b47fda8d
commit
528507c7de
7 changed files with 382 additions and 6 deletions
|
@ -350,7 +350,10 @@ ensure_body_processed(Req=#http_req{body_state=waiting}) ->
|
|||
{error, badarg} -> ok; %% No body.
|
||||
{error, _Reason} -> close;
|
||||
_Any -> ok
|
||||
end.
|
||||
end;
|
||||
ensure_body_processed(Req=#http_req{body_state={multipart, _, _}}) ->
|
||||
{ok, Req2} = cowboy_http_req:multipart_skip(Req),
|
||||
ensure_body_processed(Req2).
|
||||
|
||||
-spec ensure_response(#http_req{}) -> ok.
|
||||
%% The handler has already fully replied to the client.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue