mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 23:59:49 +00:00
LibHTTP: Remove attempt to read extra line after response headers
When LibHTTP encountered the blank line between the headers and the body in a HTTP response it made a call the m_socket->can_read_line(). This ultimately tried to find a newline in the stream. If the response body was small and did not contain a new line then the request would hang. The call to m_socket->can_read_line() is removed so that the code is able to progress into the body reading loop.
This commit is contained in:
parent
2925725c9a
commit
12ff5c9bfd
Notes:
sideshowbarker
2024-07-17 18:59:56 +09:00
Author: https://github.com/wezm
Commit: 12ff5c9bfd
Pull-request: https://github.com/SerenityOS/serenity/pull/12447
Reviewed-by: https://github.com/alimpfard ✅
1 changed files with 0 additions and 6 deletions
|
@ -316,12 +316,6 @@ void Job::on_socket_connected()
|
||||||
if (m_code == 204)
|
if (m_code == 204)
|
||||||
return finish_up();
|
return finish_up();
|
||||||
|
|
||||||
can_read_line = m_socket->can_read_line();
|
|
||||||
if (can_read_line.is_error())
|
|
||||||
return deferred_invoke([this] { did_fail(Core::NetworkJob::Error::TransmissionFailed); });
|
|
||||||
|
|
||||||
if (!can_read_line.value())
|
|
||||||
return;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
auto parts = line.split_view(':');
|
auto parts = line.split_view(':');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue