mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
LibWeb/ResourceLoader: Display HTTP reason phrase in error status
This commit is contained in:
parent
caf74e7ed6
commit
9dd7b901ab
Notes:
github-actions[bot]
2024-10-11 06:44:14 +00:00
Author: https://github.com/rmg-x Commit: https://github.com/LadybirdBrowser/ladybird/commit/9dd7b901ab0 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1723
1 changed files with 3 additions and 2 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <LibCore/Directory.h>
|
||||
#include <LibCore/MimeData.h>
|
||||
#include <LibCore/Resource.h>
|
||||
#include <LibHTTP/HttpResponse.h>
|
||||
#include <LibRequests/Request.h>
|
||||
#include <LibRequests/RequestClient.h>
|
||||
#include <LibWeb/Cookie/Cookie.h>
|
||||
|
@ -432,8 +433,8 @@ void ResourceLoader::load(LoadRequest& request, SuccessCallback success_callback
|
|||
else
|
||||
error_builder.append("Load failed"sv);
|
||||
|
||||
if (status_code.has_value())
|
||||
error_builder.appendff(" (status code: {})", *status_code);
|
||||
if (status_code.has_value() && *status_code > 0)
|
||||
error_builder.appendff(" (status: {} {})", *status_code, HTTP::HttpResponse::reason_phrase_for_code(*status_code));
|
||||
|
||||
log_failure(request, error_builder.string_view());
|
||||
if (error_callback)
|
||||
|
|
Loading…
Reference in a new issue