LibHTTP: Treat EOF on a non-Finished state as an error

This commit is contained in:
Ali Mohammad Pur 2021-10-04 15:02:38 +03:30 committed by Andreas Kling
commit 830b0e8f2d
Notes: sideshowbarker 2024-07-18 03:04:56 +09:00

View file

@ -132,6 +132,9 @@ void Job::on_socket_connected()
return;
}
if (eof())
return deferred_invoke([this] { did_fail(Core::NetworkJob::Error::ProtocolFailed); });
if (m_state == State::InStatus) {
if (!can_read_line()) {
dbgln_if(JOB_DEBUG, "Job {} cannot read line", m_request.url());