0
Fork 0
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:
Anthony Ramine 2011-11-08 00:51:49 +01:00 committed by Loïc Hoguin
parent a5b47fda8d
commit 528507c7de
7 changed files with 382 additions and 6 deletions

View file

@ -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.