Skip to content

Commit

Permalink
storage: fix fold_resource1 accumulation
Browse files Browse the repository at this point in the history
  • Loading branch information
astro committed Mar 25, 2013
1 parent 9defbfc commit 451cbc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/shared/src/storage.erl
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fold_resource(URL, Offset, Length, F, AccIn, Redirects) ->
%% Partial Content
{ok, {{206, _}, _Headers, Pid}} ->
%% Strrream:
{Transferred, AccOut} = fold_resource1(Pid, F, AccIn),
{Transferred, AccOut} = fold_resource1(Pid, F, {0, AccIn}),
if
Transferred == Length ->
%% Ok
Expand All @@ -150,7 +150,7 @@ fold_resource(URL, Offset, Length, F, AccIn, Redirects) ->
%% Finalize this response:
fold_resource1(Pid, fun(_, _) ->
ok
end, undefined),
end, {0, undefined}),

case extract_header("location", Headers) of
undefined ->
Expand Down

0 comments on commit 451cbc8

Please sign in to comment.