mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-04 05:19:58 +03:00
LibHTTP: Relax the assertion on extra reads after transfer is finished
This was added in #4831, but it didn't account for extra newlines after the response (seems like some servers like to do this).
This commit is contained in:
parent
832e9c6e02
commit
a57f152ec7
Notes:
sideshowbarker
2024-07-18 17:44:45 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/a57f152ec74 Pull-request: https://github.com/SerenityOS/serenity/pull/7298
@ -125,12 +125,9 @@ void Job::on_socket_connected()
|
||||
return;
|
||||
|
||||
if (m_state == State::Finished) {
|
||||
// This is probably just a EOF notification, which means we should receive nothing
|
||||
// and then get eof() == true.
|
||||
[[maybe_unused]] auto payload = receive(64);
|
||||
// These assertions are only correct if "Connection: close".
|
||||
VERIFY(payload.is_empty());
|
||||
VERIFY(eof());
|
||||
// We have everything we want, at this point, we can either get an EOF, or a bunch of extra newlines
|
||||
// (unless "Connection: close" isn't specified)
|
||||
// So just ignore everything after this.
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user