mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +00:00
WebServer: Move server configuration into WebServer::Configuration
This moves the configuration of the web server, which currently only consists of the root path, into a new class, Configuration. Since the configuration is global and not per client, it is accessed by a singleton getter. This change simplifies future extensions of the configurable parameters.
This commit is contained in:
parent
2d18d3f329
commit
e77ca79897
Notes:
sideshowbarker
2024-07-18 12:26:28 +09:00
Author: https://github.com/MaxWipfli
Commit: e77ca79897
Pull-request: https://github.com/SerenityOS/serenity/pull/7879
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/gunnarbeutner
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/stelar7
6 changed files with 65 additions and 9 deletions
|
@ -19,7 +19,7 @@ public:
|
|||
void start();
|
||||
|
||||
private:
|
||||
Client(NonnullRefPtr<Core::TCPSocket>, String const&, Core::Object* parent);
|
||||
Client(NonnullRefPtr<Core::TCPSocket>, Core::Object* parent);
|
||||
|
||||
void handle_request(ReadonlyBytes);
|
||||
void send_response(InputStream&, HTTP::HttpRequest const&, String const& content_type);
|
||||
|
@ -30,7 +30,6 @@ private:
|
|||
void handle_directory_listing(String const& requested_path, String const& real_path, HTTP::HttpRequest const&);
|
||||
|
||||
NonnullRefPtr<Core::TCPSocket> m_socket;
|
||||
String m_root_path;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue