WebServer: Use canonical reasons phrases for error responses

This changes the Client::set_error_response() to not take a "message"
anymore. It now uses the canonical reason phrase which is derived from
the response code.
This commit is contained in:
Max Wipfli 2021-06-05 15:48:11 +02:00 committed by Andreas Kling
commit 2d18d3f329
Notes: sideshowbarker 2024-07-18 12:26:31 +09:00
2 changed files with 8 additions and 6 deletions

View file

@ -24,7 +24,7 @@ private:
void handle_request(ReadonlyBytes);
void send_response(InputStream&, HTTP::HttpRequest const&, String const& content_type);
void send_redirect(StringView redirect, HTTP::HttpRequest const&);
void send_error_response(unsigned code, StringView const& message, HTTP::HttpRequest const&);
void send_error_response(unsigned code, HTTP::HttpRequest const&);
void die();
void log_response(unsigned code, HTTP::HttpRequest const&);
void handle_directory_listing(String const& requested_path, String const& real_path, HTTP::HttpRequest const&);