Skip to content

Commit

Permalink
z_url_fetch: Fix a problem where fetching large page could give a bad…
Browse files Browse the repository at this point in the history
…match (#99) (0.x)
  • Loading branch information
mworrell committed Feb 3, 2025
1 parent 983527a commit 26369cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/z_url_fetch.erl
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,10 @@ fetch_stream_data(ReqId, HandlerPid, #fstate{ length = Length, max = Max } = FSt
fetch_stream_data(ReqId, HandlerPid, FState1);
false ->
httpc:cancel_request(ReqId),
FState1 = FState#fstate{
FState2 = FState1#fstate{
code = 200
},
{ok, FState1}
{ok, FState2}
end;
{error, _} = Error ->
httpc:cancel_request(ReqId),
Expand Down

0 comments on commit 26369cb

Please sign in to comment.