Browse Source

LibHTTP: Always read in the last chunk

This was accidentally put behind a debug flag.

Fixes #5080
Luke 4 years ago
parent
commit
712f76c010
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Userland/Libraries/LibHTTP/Job.cpp

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

@@ -300,9 +300,10 @@ void Job::on_socket_connected()
 
 
                     // we've read everything, now let's get the next chunk
                     // we've read everything, now let's get the next chunk
                     size = -1;
                     size = -1;
+                    [[maybe_unused]] auto line = read_line(PAGE_SIZE);
 
 
                     if constexpr (debug_job)
                     if constexpr (debug_job)
-                        dbgln("Line following (should be empty): '{}'", read_line(PAGE_SIZE));
+                        dbgln("Line following (should be empty): '{}'", line);
                 }
                 }
                 m_current_chunk_remaining_size = size;
                 m_current_chunk_remaining_size = size;
             }
             }