LibWeb: Let's not pass "%u" to String() and expect something to happen

This commit is contained in:
Andreas Kling 2020-06-25 22:22:33 +02:00
parent 54835689c9
commit ee4cf0bc69
Notes: sideshowbarker 2024-07-19 05:22:39 +09:00

View file

@ -174,7 +174,7 @@ void ResourceLoader::load(const URL& url, Function<void(const ByteBuffer&, const
}
if (status_code.has_value() && status_code.value() >= 400 && status_code.value() <= 499) {
if (error_callback)
error_callback(String("HTTP error (%u)", status_code.value()));
error_callback(String::format("HTTP error (%u)", status_code.value()));
return;
}
success_callback(ByteBuffer::copy(payload.data(), payload.size()), response_headers);