LibHTTP: Ignore empty reads on chunk boundaries

This commit is contained in:
Ali Mohammad Pur 2021-10-04 14:18:15 +03:30 committed by Andreas Kling
parent 3564e4eff1
commit fdd2d49c5b

View file

@ -240,6 +240,8 @@ void Job::on_socket_connected()
auto size_lines = size_data.view().lines();
dbgln_if(JOB_DEBUG, "Job: Received a chunk with size '{}'", size_data);
if (size_lines.size() == 0) {
if (!eof())
return AK::IterationDecision::Continue;
dbgln("Job: Reached end of stream");
finish_up();
return IterationDecision::Break;