Browse Source

LibHTTP: Ignore empty reads on chunk boundaries

Ali Mohammad Pur 3 năm trước cách đây
mục cha
commit
fdd2d49c5b
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      Userland/Libraries/LibHTTP/Job.cpp

+ 2 - 0
Userland/Libraries/LibHTTP/Job.cpp

@@ -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;