diff options
author | metamuffin <metamuffin@disroot.org> | 2023-02-26 16:18:45 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-02-26 16:18:45 +0100 |
commit | a3fb25019336ab9238d73f29a004b71cfc31a032 (patch) | |
tree | 783b91075f61f4b89eef35f08064ca15b0ddb2f9 /src/main.rs | |
parent | c3371bd7e3eb40fad374fe85a994806c2d27488e (diff) | |
download | gnix-a3fb25019336ab9238d73f29a004b71cfc31a032.tar gnix-a3fb25019336ab9238d73f29a004b71cfc31a032.tar.bz2 gnix-a3fb25019336ab9238d73f29a004b71cfc31a032.tar.zst |
support range requests
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 422341d..e39cf58 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,5 @@ #![feature(try_trait_v2)] +#![feature(exclusive_range_pattern)] pub mod config; pub mod error; @@ -21,7 +22,7 @@ use hyper::{ service::service_fn, Request, Response, StatusCode, }; -use log::{debug, info, warn}; +use log::{debug, error, info, warn}; use std::{fs::File, io::BufReader, net::SocketAddr, path::Path, sync::Arc}; use tokio::{ io::{AsyncRead, AsyncWrite}, @@ -42,12 +43,12 @@ async fn main() -> anyhow::Result<()> { tokio::spawn(async move { if let Err(e) = serve_http(config).await { - panic!("{e}") + error!("{e}") } }); tokio::spawn(async move { if let Err(e) = serve_https(config2).await { - panic!("{e}") + error!("{e}") } }); |