diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-10-04 14:18:15 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-04 13:06:03 +0200 |
commit | fdd2d49c5b6befe8ef2da0400b4ecbe33a00502c (patch) | |
tree | ffec176f9270ccfe13bc98337bbdf11bf4d2a24c /Userland/Libraries/LibHTTP | |
parent | 3564e4eff1790b7ea3db74c300bd8b9fdd0af020 (diff) | |
download | serenity-fdd2d49c5b6befe8ef2da0400b4ecbe33a00502c.zip |
LibHTTP: Ignore empty reads on chunk boundaries
Diffstat (limited to 'Userland/Libraries/LibHTTP')
-rw-r--r-- | Userland/Libraries/LibHTTP/Job.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibHTTP/Job.cpp b/Userland/Libraries/LibHTTP/Job.cpp index c60ebb8651..a850bef3af 100644 --- a/Userland/Libraries/LibHTTP/Job.cpp +++ b/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; |