1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 08:37:34 +00:00

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
parent 873e95cb6a
commit 830b0e8f2d

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());