mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibHTTP: Tolerate random whitespace in chunked encoding size field
Some servers decide to add newlines (and not \r\n) into that field, this commit makes us tolerate that and not crash in cases like in #22463. Fixes #22463.
This commit is contained in:
parent
267040dde7
commit
75e60d3a68
1 changed files with 1 additions and 1 deletions
|
@ -413,7 +413,7 @@ void Job::on_socket_connected()
|
|||
m_should_read_chunk_ending_line = false;
|
||||
continue;
|
||||
}
|
||||
auto size_lines = size_data.view().lines();
|
||||
auto size_lines = size_data.view().trim_whitespace().lines();
|
||||
dbgln_if(JOB_DEBUG, "Job: Received a chunk with size '{}'", size_data);
|
||||
if (size_lines.size() == 0) {
|
||||
if (!m_socket->is_eof())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue