Compare commits

...

3 commits
master ... dev

3 changed files with 6 additions and 5 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. 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 # 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: 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::{ use crate::{
http::{ error, http::{
requests::{Request, RequestStatus, Url}, requests::{Request, RequestStatus, Url},
responses::{Body, Response, UnitOrBoxedError}, responses::{Body, Response, UnitOrBoxedError},
}, }, threads::ThreadPool
threads::ThreadPool,
}; };
use std::{ use std::{
collections::HashMap, collections::HashMap,
@ -65,7 +64,7 @@ impl Handlers {
RequestStatus::Ok(req) => req, RequestStatus::Ok(req) => req,
RequestStatus::MalformedHTTP(stream) => { RequestStatus::MalformedHTTP(stream) => {
stream.shutdown(Shutdown::Both).unwrap_or_else(|_| { stream.shutdown(Shutdown::Both).unwrap_or_else(|_| {
eprintln!("Failed to close malformed HTTP stream") error!("Failed to shutdown malformed HTTP stream")
}); });
continue; continue;
} }

View file

@ -1,6 +1,6 @@
#[macro_export] #[macro_export]
macro_rules! error { macro_rules! error {
($msg:expr) => { ($msg:expr) => {
eprintln!("[ERROR] {}", $msg); eprintln!("[ERROR] {}", $msg)
}; };
} }