Day 48
·Today, I aimed to enhance a few features of my HTTP server. Initially, I focused on refining my /hello implementation to be more concrete than it was on Friday. After about an hour of work, I achieved a state I was satisfied with, incorporating good testing. Instead of serving a dumped HTML string, it now pulls content from a file in my hello directory. This progress also partially fulfills the file-serving aspect of my project, as it now knows how to read and serve files. However, I still need to extend its capabilities to handle other file types such as images and text files.
Over the next few hours, I focused on ensuring the directory listing functioned correctly. I refined my program to recognize when the provided path is a directory, enabling it to list all files within that directory on a generated HTML page. Additionally, I implemented a feature where each listed file serves as a link to itself, allowing users to access those files directly.