mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibHTTP: Treat EOF on a non-Finished state as an error
This commit is contained in:
parent
873e95cb6a
commit
830b0e8f2d
Notes:
sideshowbarker
2024-07-18 03:04:56 +09:00
Author: https://github.com/alimpfard
Commit: 830b0e8f2d
Pull-request: https://github.com/SerenityOS/serenity/pull/10350
Reviewed-by: https://github.com/awesomekling ✅
1 changed files with 3 additions and 0 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue