Skip to content

Commit

Permalink
Workaround for #10
Browse files Browse the repository at this point in the history
  • Loading branch information
lennart-k committed Jan 4, 2025
1 parent f406b7d commit 577091c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 28 deletions.
21 changes: 0 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ quote = "1.0"
proc-macro2 = "1.0"
heck = "0.5"
darling = "0.20"
axum = { version = "0.7", features = ["http2"] }

[dependencies]
rustical_store = { workspace = true }
Expand Down Expand Up @@ -133,4 +132,3 @@ rpassword.workspace = true
argon2.workspace = true
pbkdf2.workspace = true
password-hash.workspace = true
axum.workspace = true
4 changes: 0 additions & 4 deletions crates/store/src/auth/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ impl ResponseError for UnauthorizedError {
header::WWW_AUTHENTICATE,
r#"Basic realm="RustiCal", charset="UTF-8""#,
))
// The force_close is a workaround for a bug where something freezes when the
// connection is reused after a 401.
// possibly related to https://github.com/actix/actix-web/issues/1805
.force_close()
.finish()
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ pub fn make_app<AS: AddressbookStore + ?Sized, CS: CalendarStore + ?Sized>(
frontend_config,
)
}))
.service(web::redirect("/", "/frontend").see_other())
// .service(web::redirect("/", "/frontend").see_other())
}
5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::config::Config;
use actix_web::http::KeepAlive;
use actix_web::HttpServer;
use anyhow::Result;
use app::make_app;
Expand Down Expand Up @@ -75,6 +76,10 @@ async fn main() -> Result<()> {
)
})
.bind((config.http.host, config.http.port))?
// Workaround for a weird bug where
// new requests might timeout since they cannot properly reuse the connection
// https://github.com/lennart-k/rustical/issues/10
.keep_alive(KeepAlive::Disabled)
.run()
.await?;
}
Expand Down

0 comments on commit 577091c

Please sign in to comment.