mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibHTTP+LibWeb: Remove unused HTTP::HTTPResponse
The only thing in HTTPResponse being used is reason_phrase_for_code, which is just a static helper method. Move it to its own file and remove HTTPResponse. This is just one less thing to have to port to an upcoming HTTP header refactor.
This commit is contained in:
parent
bf75f52ce0
commit
0480934afb
Notes:
github-actions[bot]
2025-11-27 13:59:13 +00:00
Author: https://github.com/trflynn89
Commit: 0480934afb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6944
Reviewed-by: https://github.com/gmta ✅
6 changed files with 82 additions and 130 deletions
|
|
@ -10,7 +10,6 @@
|
|||
#include <LibCore/MimeData.h>
|
||||
#include <LibCore/Resource.h>
|
||||
#include <LibGC/Function.h>
|
||||
#include <LibHTTP/HttpResponse.h>
|
||||
#include <LibRequests/Request.h>
|
||||
#include <LibRequests/RequestClient.h>
|
||||
#include <LibURL/Parser.h>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include <AK/StringBuilder.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Time.h>
|
||||
#include <LibHTTP/HttpResponse.h>
|
||||
#include <LibHTTP/Status.h>
|
||||
#include <LibWeb/WebDriver/Client.h>
|
||||
|
||||
namespace Web::WebDriver {
|
||||
|
|
@ -326,7 +326,7 @@ ErrorOr<void, Client::WrappedError> Client::send_error_response(HTTP::HttpReques
|
|||
{
|
||||
// FIXME: Implement to spec.
|
||||
dbgln_if(WEBDRIVER_DEBUG, "Sending error response: {} {}: {}", error.http_status, error.error, error.message);
|
||||
auto reason = HTTP::HttpResponse::reason_phrase_for_code(error.http_status);
|
||||
auto reason = HTTP::reason_phrase_for_code(error.http_status);
|
||||
|
||||
JsonObject error_response;
|
||||
error_response.set("error"sv, error.error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue