Skip to content

Commit

Permalink
fix multipart processing
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitc committed Dec 20, 2013
1 parent 7011a86 commit 37ee8bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hackney_response.erl
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ stream_multipart(Client=#client{body_state=waiting,
{<<"multipart">>, _, Params} = hackney_headers:content_type(CType),
{_, Boundary} = lists:keyfind(<<"boundary">>, 1, Params),
Parser = hackney_multipart:parser(Boundary),
multipart_data(Client, Length, {more, Parser});
multipart_data(Client#client{body_state=processing}, Length,
{more, Parser});
stream_multipart(Client=#client{multipart={Length, Cont}}) ->
multipart_data(Client, Length, Cont());
stream_multipart(Client=#client{body_state=done}) ->
Expand Down

0 comments on commit 37ee8bd

Please sign in to comment.