Compare commits

...

2 commits

Author SHA1 Message Date
11db47b005
chore: update readme 2024-11-18 14:21:07 +11:00
f4b4d6a02d
refactor: use error macro 2024-11-18 14:20:51 +11:00
2 changed files with 5 additions and 4 deletions

View file

@ -20,6 +20,8 @@ If you are deploying to production, you can provide a directory path in the firs
Only `.svg` files will be read from that directory. The server's default port is `7878`, although this can be configured with the `PORT` environment variable.
It is recommended to place a reverse proxy in front of luciders to provide caching support, response compression and other optimisations that are out of scope for this project.
# Docker
You can build and run this project with Docker. The Dockerfile is configured to use the submodule for the icons. To build the image:

View file

@ -1,9 +1,8 @@
use crate::{
http::{
error, http::{
requests::{Request, RequestStatus, Url},
responses::{Body, Response, UnitOrBoxedError},
},
threads::ThreadPool,
}, threads::ThreadPool
};
use std::{
collections::HashMap,
@ -65,7 +64,7 @@ impl Handlers {
RequestStatus::Ok(req) => req,
RequestStatus::MalformedHTTP(stream) => {
stream.shutdown(Shutdown::Both).unwrap_or_else(|_| {
eprintln!("Failed to close malformed HTTP stream")
error!("Failed to shutdown malformed HTTP stream")
});
continue;
}