v0.42.4_fixes

This commit is contained in:
Mateusz Gruszczyński committed 2026-11-27 13:56:59 +01:00
1 parent efc6eda4cd
commit 51631810e1
29 files changed
+1192 -394

No files matched your search

+2 -2
View File
@@ -423,7 +423,7 @@ pub fn index_files<'a>(compiled: Option<&'a Compiled>, directory_components: &[S
pub fn accept_path_info(compiled: Option<&Compiled>, script_path: &str, fallback: bool) -> bool {
match compiled.and_then(|compiled| matching_scopes(compiled, script_path).into_iter()
.filter_map(|scope| scope.accept_path_info).last()) {
.filter_map(|scope| scope.accept_path_info).next_back()) {
Some(AcceptPathInfoMode::On) => true,
Some(AcceptPathInfoMode::Off) => false,
Some(AcceptPathInfoMode::Default) | None => fallback,
@@ -437,7 +437,7 @@ pub fn has_error_documents(compiled: Option<&Compiled>) -> bool {
pub fn error_document<'a>(compiled: Option<&'a Compiled>, path: &str, status: StatusCode) -> Option<&'a str> {
compiled?.scopes.iter().filter(|scope| {
path_components(path).ok().is_some_and(|parts| scope_matches(scope, &parts))
}).filter_map(|scope| scope.error_documents.get(&status.as_u16()).map(String::as_str)).last()
}).filter_map(|scope| scope.error_documents.get(&status.as_u16()).map(String::as_str)).next_back()
}
pub fn directory_listing(compiled: Option<&Compiled>, directory_components: &[String], fallback: bool) -> bool {