fix(dav): REPORT auf Kalender-URLs an CalDAV-Handler delegieren

Die CardDAV-Route /<username>/<ab_part>/ fing REPORT auf Kalender-URLs
(z.B. /dav/Adam/cal-1/) mit 404 ab, weil 'cal-1' nicht mit 'ab-' startet.
DAVx5 bekam bei der calendar-query einen 404 und markierte den EVENTS-
Sync als Hard Error. Fix analog zu PROPFIND/OPTIONS: wenn ab_part nicht
ab-* ist, an den CalDAV-REPORT-Handler delegieren.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Hacker 2026-04-13 03:48:26 +02:00
parent 35535fb84b
commit 1762437528
1 changed files with 2 additions and 1 deletions

View File

@ -196,7 +196,8 @@ def ab_contact_propfind(username, ab_part, filename):
@basic_auth @basic_auth
def ab_report(username, ab_part): def ab_report(username, ab_part):
if not ab_part.startswith('ab-'): if not ab_part.startswith('ab-'):
return Response('Not found', 404) from .caldav import report as _cal_report
return _cal_report(subpath=f'{username}/{ab_part}')
user: User = request.dav_user user: User = request.dav_user
if username != user.username: if username != user.username:
return Response('', 403) return Response('', 403)