mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:37:34 +00:00
WebServer: Add basic directory listings
If a directory does not have an index.html file, we will now generate a directory listing HTML document for that directory on the fly. :^)
This commit is contained in:
parent
90fec9c732
commit
083f3edcb0
2 changed files with 58 additions and 7 deletions
|
@ -44,9 +44,11 @@ private:
|
|||
Client(NonnullRefPtr<Core::TCPSocket>, Core::Object* parent);
|
||||
|
||||
void handle_request(ByteBuffer);
|
||||
void send_response(StringView, const Core::HttpRequest&);
|
||||
void send_error_response(unsigned code, const StringView& message, const Core::HttpRequest&);
|
||||
void die();
|
||||
void log_response(unsigned code, const Core::HttpRequest&);
|
||||
void handle_directory_listing(const String& requested_path, const String& real_path, const Core::HttpRequest&);
|
||||
|
||||
NonnullRefPtr<Core::TCPSocket> m_socket;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue