mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:17:35 +00:00
WebServer: Ensure directory listing URLs end with a slash
We will now send a redirect (301) if a directory listing is requested and the request URL doesn't end with a slash character. This makes relative file URLs that we generate in directory listings actually work as expected.
This commit is contained in:
parent
f88fe5dc3f
commit
7590270e13
2 changed files with 26 additions and 0 deletions
|
@ -45,6 +45,7 @@ private:
|
|||
|
||||
void handle_request(ByteBuffer);
|
||||
void send_response(StringView, const Core::HttpRequest&);
|
||||
void send_redirect(StringView redirect, const Core::HttpRequest& request);
|
||||
void send_error_response(unsigned code, const StringView& message, const Core::HttpRequest&);
|
||||
void die();
|
||||
void log_response(unsigned code, const Core::HttpRequest&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue