Fix bug with missing trailing slash in propfind response

This commit is contained in:
Lennart
2025-06-09 22:36:11 +02:00
parent 6d6f8f20df
commit 7628cdafbd
22 changed files with 32 additions and 22 deletions

View File

@@ -67,7 +67,7 @@ fn objects_response(
object,
principal: principal.to_owned(),
}
.propfind_typed(&path, prop, puri, user)?,
.propfind(&path, prop, puri, user)?,
);
}

View File

@@ -39,7 +39,7 @@ pub async fn handle_sync_collection<C: CalendarStore>(
object,
principal: principal.to_owned(),
}
.propfind_typed(&path, &sync_collection.prop, puri, user)?,
.propfind(&path, &sync_collection.prop, puri, user)?,
);
}

View File

@@ -100,6 +100,8 @@ impl Resource for CalendarResource {
type Error = Error;
type Principal = User;
const IS_COLLECTION: bool = true;
fn get_resourcetype(&self) -> Resourcetype {
if self.cal.subscription_url.is_none() {
Resourcetype(&[

View File

@@ -50,7 +50,6 @@ impl<C: CalendarStore, S: SubscriptionStore> ResourceService for CalendarResourc
type PrincipalUri = CalDavPrincipalUri;
const DAV_HEADER: &str = "1, 3, access-control, calendar-access";
const IS_COLLECTION: bool = true;
async fn get_resource(
&self,

View File

@@ -27,6 +27,8 @@ impl Resource for CalendarObjectResource {
type Error = Error;
type Principal = User;
const IS_COLLECTION: bool = false;
fn get_resourcetype(&self) -> Resourcetype {
Resourcetype(&[])
}

View File

@@ -50,7 +50,6 @@ impl<C: CalendarStore> ResourceService for CalendarObjectResourceService<C> {
type PrincipalUri = CalDavPrincipalUri;
const DAV_HEADER: &str = "1, 3, access-control, calendar-access";
const IS_COLLECTION: bool = false;
async fn get_resource(
&self,

View File

@@ -28,6 +28,8 @@ impl Resource for CalendarSetResource {
type Error = Error;
type Principal = User;
const IS_COLLECTION: bool = true;
fn get_resourcetype(&self) -> Resourcetype {
Resourcetype(&[ResourcetypeInner(
Some(rustical_dav::namespace::NS_DAV),

View File

@@ -45,7 +45,6 @@ impl<C: CalendarStore, S: SubscriptionStore> ResourceService for CalendarSetReso
type PrincipalUri = CalDavPrincipalUri;
const DAV_HEADER: &str = "1, 3, access-control, extended-mkcol, calendar-access";
const IS_COLLECTION: bool = true;
async fn get_resource(
&self,

View File

@@ -27,6 +27,8 @@ impl Resource for PrincipalResource {
type Error = Error;
type Principal = User;
const IS_COLLECTION: bool = true;
fn get_resourcetype(&self) -> Resourcetype {
Resourcetype(&[
ResourcetypeInner(Some(rustical_dav::namespace::NS_DAV), "collection"),

View File

@@ -46,7 +46,6 @@ impl<AP: AuthenticationProvider, S: SubscriptionStore, CS: CalendarStore, BS: Ca
type PrincipalUri = CalDavPrincipalUri;
const DAV_HEADER: &str = "1, 3, access-control, calendar-access";
const IS_COLLECTION: bool = true;
async fn get_resource(
&self,