summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-05-31 15:06:05 +0100
committerLinus Groh <mail@linusgroh.de>2021-05-31 17:43:54 +0100
commit81b7b2f49e32c9f85f32461d6ec2311424998e09 (patch)
tree27ef50fbc1570d37a9caf3c068fbf9f22e6a26fc /Userland/Libraries
parenta4bd29828c18f10de2620cf74575f35814637611 (diff)
downloadserenity-81b7b2f49e32c9f85f32461d6ec2311424998e09.zip
LibHTTP: Replace fprintf(stderr) with warnln()
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibHTTP/Job.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibHTTP/Job.cpp b/Userland/Libraries/LibHTTP/Job.cpp
index 378fe4cb12..c500fef356 100644
--- a/Userland/Libraries/LibHTTP/Job.cpp
+++ b/Userland/Libraries/LibHTTP/Job.cpp
@@ -136,7 +136,7 @@ void Job::on_socket_connected()
return;
auto line = read_line(PAGE_SIZE);
if (line.is_null()) {
- fprintf(stderr, "Job: Expected HTTP status\n");
+ warnln("Job: Expected HTTP status");
return deferred_invoke([this](auto&) { did_fail(Core::NetworkJob::Error::TransmissionFailed); });
}
auto parts = line.split_view(' ');
@@ -146,7 +146,7 @@ void Job::on_socket_connected()
}
auto code = parts[1].to_uint();
if (!code.has_value()) {
- fprintf(stderr, "Job: Expected numeric HTTP status\n");
+ warnln("Job: Expected numeric HTTP status");
return deferred_invoke([this](auto&) { did_fail(Core::NetworkJob::Error::ProtocolFailed); });
}
m_code = code.value();
@@ -164,7 +164,7 @@ void Job::on_socket_connected()
// that is not a valid trailing header.
return finish_up();
}
- fprintf(stderr, "Job: Expected HTTP header\n");
+ warnln("Job: Expected HTTP header");
return did_fail(Core::NetworkJob::Error::ProtocolFailed);
}
if (line.is_empty()) {
@@ -185,7 +185,7 @@ void Job::on_socket_connected()
// that is not a valid trailing header.
return finish_up();
}
- fprintf(stderr, "Job: Expected HTTP header with key/value\n");
+ warnln("Job: Expected HTTP header with key/value");
return deferred_invoke([this](auto&) { did_fail(Core::NetworkJob::Error::ProtocolFailed); });
}
auto name = parts[0];