mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
AK+Everywhere: Remove the null state of DeprecatedString
This commit removes DeprecatedString's "null" state, and replaces all its users with one of the following: - A normal, empty DeprecatedString - Optional<DeprecatedString> Note that null states of DeprecatedFlyString/StringView/etc are *not* affected by this commit. However, DeprecatedString::empty() is now considered equal to a null StringView.
This commit is contained in:
parent
daf6d8173c
commit
aeee98b3a1
189 changed files with 597 additions and 652 deletions
|
@ -249,10 +249,6 @@ void Job::on_socket_connected()
|
|||
auto line = maybe_line.release_value();
|
||||
|
||||
dbgln_if(JOB_DEBUG, "Job {} read line of length {}", m_request.url(), line.length());
|
||||
if (line.is_null()) {
|
||||
dbgln("Job: Expected HTTP status");
|
||||
return deferred_invoke([this] { did_fail(Core::NetworkJob::Error::TransmissionFailed); });
|
||||
}
|
||||
auto parts = line.split_view(' ');
|
||||
if (parts.size() < 2) {
|
||||
dbgln("Job: Expected 2-part or 3-part HTTP status line, got '{}'", line);
|
||||
|
@ -302,16 +298,6 @@ void Job::on_socket_connected()
|
|||
}
|
||||
auto line = maybe_line.release_value();
|
||||
|
||||
if (line.is_null()) {
|
||||
if (m_state == State::Trailers) {
|
||||
// Some servers like to send two ending chunks
|
||||
// use this fact as an excuse to ignore anything after the last chunk
|
||||
// that is not a valid trailing header.
|
||||
return finish_up();
|
||||
}
|
||||
dbgln("Job: Expected HTTP header");
|
||||
return did_fail(Core::NetworkJob::Error::ProtocolFailed);
|
||||
}
|
||||
if (line.is_empty()) {
|
||||
if (m_state == State::Trailers) {
|
||||
return finish_up();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue