diff options
author | Linus Groh <mail@linusgroh.de> | 2021-05-31 15:06:05 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-05-31 17:43:54 +0100 |
commit | 81b7b2f49e32c9f85f32461d6ec2311424998e09 (patch) | |
tree | 27ef50fbc1570d37a9caf3c068fbf9f22e6a26fc /Userland/Libraries/LibHTTP/Job.cpp | |
parent | a4bd29828c18f10de2620cf74575f35814637611 (diff) | |
download | serenity-81b7b2f49e32c9f85f32461d6ec2311424998e09.zip |
LibHTTP: Replace fprintf(stderr) with warnln()
Diffstat (limited to 'Userland/Libraries/LibHTTP/Job.cpp')
-rw-r--r-- | Userland/Libraries/LibHTTP/Job.cpp | 8 |
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]; |