diff --git a/crates/auth/src/error.rs b/crates/auth/src/error.rs index 763b4b1..87f7915 100644 --- a/crates/auth/src/error.rs +++ b/crates/auth/src/error.rs @@ -26,6 +26,8 @@ impl actix_web::error::ResponseError for Error { match self { Error::Unauthorized => HttpResponse::build(self.status_code()) .append_header(("WWW-Authenticate", "Basic")) + // This is an unfortunate workaround for https://github.com/actix/actix-web/issues/1805 + .force_close() .body(self.to_string()), _ => HttpResponse::build(self.status_code()).body(self.to_string()), } diff --git a/src/main.rs b/src/main.rs index 0834244..6740007 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,4 @@ use crate::config::Config; -use actix_web::http::KeepAlive; use actix_web::HttpServer; use anyhow::Result; use app::make_app; @@ -57,8 +56,6 @@ async fn main() -> Result<()> { HttpServer::new(move || make_app(cal_store.clone(), auth.clone())) .bind((config.http.host, config.http.port))? - // This is an unfortunate workaround for https://github.com/actix/actix-web/issues/1805 - .keep_alive(KeepAlive::Disabled) .run() .await?;