fix: PROPFIND-Response-Href stimmt mit Anfrage-URL ueberein
Bisher war der href in der Response immer /dav/, auch wenn DAVx5 einen PROPFIND auf / oder /.well-known/caldav gemacht hat. Das kann Clients verwirren - die erwarten, dass der Response-Pfad zum angefragten Pfad passt. current-user-principal zeigt weiterhin korrekt auf /dav/Adam/. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
39e68eee6a
commit
189aa18be8
|
|
@ -255,9 +255,12 @@ def propfind(subpath=''):
|
|||
multistatus = ET.Element(_qn('d', 'multistatus'))
|
||||
parts = [p for p in subpath.split('/') if p]
|
||||
|
||||
# /dav/ (root): return principal pointer
|
||||
# /dav/ (root) or / (when called via the app-level shortcut for DAVx5)
|
||||
if not parts:
|
||||
multistatus.append(_root_response('/dav/', user))
|
||||
# Use the actual request path so Clients wie DAVx5 die href passend
|
||||
# zu ihrer Anfrage sehen.
|
||||
request_href = request.path if request.path.endswith('/') else request.path + '/'
|
||||
multistatus.append(_root_response(request_href, user))
|
||||
if depth != '0':
|
||||
multistatus.append(_principal_response(user))
|
||||
return _xml_response(multistatus)
|
||||
|
|
|
|||
Loading…
Reference in New Issue