1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 11:25:08 +00:00
Commit graph

10 commits

Author SHA1 Message Date
Bogdan
7590270e13 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.
2020-02-13 20:06:32 +01:00
Andreas Kling
fc562a3a93 WebServer: Remove debug spam in directory listing code 2020-02-13 08:52:24 +01:00
Andreas Kling
f767085eb6 WebServer: Escape HTML entities in path names in directory listings
I left a FIXME in here about implementing URL encoding.
2020-02-13 08:51:49 +01:00
Andreas Kling
deca1d8b77 WebServer: Show file size and modification time in directory listings
This exposed an issue with the unveil() implementation which currently
short-circuits path resolution for any path containing "/..". This will
cause the ".." entry to show up with a 1970-01-01 mtime for now. FIXME.

Also add some rulers and a nice little footer. :^)
2020-02-12 21:39:09 +01:00
Andreas Kling
083f3edcb0 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. :^)
2020-02-12 21:18:04 +01:00
Andreas Kling
2c9d94c6b9 WebServer: Use Core::DateTime for logging timestamps 2020-02-11 19:43:40 +01:00
Andreas Kling
0e44fb8731 WebServer: Add copyright headers 2020-02-11 19:25:06 +01:00
Andreas Kling
c45a5ff840 WebServer: Add missing space to HTTP error responses
Fixes #1200.
2020-02-09 17:05:29 +01:00
Andreas Kling
80703ef7d9 WebServer: Send the HTTP response headers in a single packet
This makes it easier to observe the protocol in packet logs.
2020-02-09 14:15:55 +01:00
Andreas Kling
6c752c15a2 WebServer: Implement a very basic HTTP server :^)
This server listens on port 8000 and serves HTML files from /www.
It's very simple and quite naive, but I think we can start here and
build our way to something pretty neat.

Work towards #792.
2020-02-09 14:15:55 +01:00