Skip to content

Commit 8528e70

Browse files
authored
z_url_fetch: Fix a problem where fetching large page could give a badmatch (#99)
1 parent 05d5f75 commit 8528e70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/z_url_fetch.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,10 +505,10 @@ fetch_stream_data(ReqId, HandlerPid, #fstate{ length = Length, max = Max } = FSt
505505
fetch_stream_data(ReqId, HandlerPid, FState1);
506506
false ->
507507
httpc:cancel_request(ReqId),
508-
FState1 = FState#fstate{
508+
FState2 = FState1#fstate{
509509
code = 200
510510
},
511-
{ok, FState1}
511+
{ok, FState2}
512512
end;
513513
{error, _} = Error ->
514514
httpc:cancel_request(ReqId),

0 commit comments

Comments
 (0)