Autodiscover endpoint should be case insensitive (fixes #2440)

This commit is contained in:
mdecimus
2025-11-30 19:22:05 +01:00
parent 53a04ce069
commit 72a175a434
2 changed files with 14 additions and 4 deletions

View File

@@ -85,6 +85,7 @@ impl ParseHttp for Server {
} }
} }
let todo = "hashify";
match path.next().unwrap_or_default() { match path.next().unwrap_or_default() {
"jmap" => { "jmap" => {
match (path.next().unwrap_or_default(), req.method()) { match (path.next().unwrap_or_default(), req.method()) {
@@ -504,9 +505,12 @@ impl ParseHttp for Server {
}); });
} }
} }
"autodiscover" => { "autodiscover" | "Autodiscover" => {
if req.method() == Method::POST if req.method() == Method::POST
&& path.next().unwrap_or_default() == "autodiscover.xml" && path
.next()
.unwrap_or_default()
.eq_ignore_ascii_case("autodiscover.xml")
{ {
// Limit anonymous requests // Limit anonymous requests
self.is_http_anonymous_request_allowed(&session.remote_ip) self.is_http_anonymous_request_allowed(&session.remote_ip)

View File

@@ -266,14 +266,20 @@ pub fn spawn_housekeeper(inner: Arc<Inner>, mut rx: mpsc::Receiver<HousekeeperEv
}); });
} }
HousekeeperEvent::Exit => { HousekeeperEvent::Exit => {
trc::event!(Housekeeper(trc::HousekeeperEvent::Stop)); trc::event!(
Housekeeper(trc::HousekeeperEvent::Stop),
Reason = "Shutdown"
);
return; return;
} }
} }
} }
Ok(None) => { Ok(None) => {
trc::event!(Housekeeper(trc::HousekeeperEvent::Stop)); trc::event!(
Housekeeper(trc::HousekeeperEvent::Stop),
Reason = "Channel closed"
);
return; return;
} }
Err(_) => { Err(_) => {