aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-12-17 15:49:54 +0100
committerLoïc Hoguin <[email protected]>2012-12-17 15:49:54 +0100
commit06ab46c868c15ee5b47e855e426303a128f8e7e3 (patch)
tree9d5a1efbcec44f4e96b1d931d0a4504ab026ab47 /src
parent859d915d9c7bd0a3acf1fa72f63333c000d5ec6e (diff)
parent143ed804863d96684ca79dd250546cb84ed34c9d (diff)
downloadcowboy-06ab46c868c15ee5b47e855e426303a128f8e7e3.tar.gz
cowboy-06ab46c868c15ee5b47e855e426303a128f8e7e3.tar.bz2
cowboy-06ab46c868c15ee5b47e855e426303a128f8e7e3.zip
Merge branch 'master' of git://github.com/Menirad/cowboy
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_multipart.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_multipart.erl b/src/cowboy_multipart.erl
index 83c41a8..7363054 100644
--- a/src/cowboy_multipart.erl
+++ b/src/cowboy_multipart.erl
@@ -204,8 +204,8 @@ parse_body(Bin, Pattern = {{P, PSize}, _}) when byte_size(Bin) >= PSize ->
%% next input onto tail of current input binary.
{body, Bin, fun () -> parse_body(<<>>, Pattern) end};
{BoundaryStart, Len} ->
- PBody = binary:part(Bin, BoundaryStart, Len),
- Rest = binary:part(Bin, 0, BoundaryStart),
+ PBody = binary:part(Bin, 0, BoundaryStart),
+ Rest = binary:part(Bin, BoundaryStart, Len),
{body, PBody, fun () -> parse_body(Rest, Pattern) end}
end
end;