mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
LibHTTP: Quit the read loop when an incomplete chunk size line is seen
If we don't quit, the underlying socket won't get a chance to do much other than nothing while we spin in read_while_data_available(). Fixes some possible RS spin (especially seen in Google's cookie consent page).
This commit is contained in:
parent
e8891e6d56
commit
82da36f129
1 changed files with 1 additions and 1 deletions
|
@ -245,7 +245,7 @@ void Job::on_socket_connected()
|
||||||
dbgln_if(JOB_DEBUG, "Job: Received a chunk with size '{}'", size_data);
|
dbgln_if(JOB_DEBUG, "Job: Received a chunk with size '{}'", size_data);
|
||||||
if (size_lines.size() == 0) {
|
if (size_lines.size() == 0) {
|
||||||
if (!eof())
|
if (!eof())
|
||||||
return AK::IterationDecision::Continue;
|
return AK::IterationDecision::Break;
|
||||||
dbgln("Job: Reached end of stream");
|
dbgln("Job: Reached end of stream");
|
||||||
finish_up();
|
finish_up();
|
||||||
return IterationDecision::Break;
|
return IterationDecision::Break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue