On Mon, Jun 10, 2013 at 12:26 AM, Loïc Hoguin <notifications@github.com>wrote:

> In src/cowboy_req.erl:
>
> >  	%% We just want to skip so no need to stream data here.
> >  	{ok, _Data} = Transport:recv(Socket, Length, 5000),
> >  	{eof, Req#http_req{body_state=done, multipart=undefined}};
> > -multipart_data(Req, Length, {more, Parser}) when Length > 0 ->
> > +multipart_data(Req=#http_req{socket=Socket, transport=Transport}, _, eof) ->
> > +	%% We just want to skip so no need to stream data here.
> > +	{ok, _Data} = Transport:recv(Socket, 0, 5000),
>
> The way it is now, you read N bytes of the body, declare the body reading
> done and hope for the best. If there's another request queue after it, the
> data returned by recv will be wrong because you don't know if you have
> skipped everything or not (despite marking it as done).
>

Well you actually have the same problem above. Anyway will fix that by
skipping the body until last chunk.

- benoit