ocm: derive the legacy webdav endpoint from discovery, Basic auth with the secret (#474) #475

Merged
Cordy merged 3 commits from fix-474 into main 2026-09-10 10:31:33 +00:00
Owner

Root cause of "Summer Slam still shows as a file" — and of every remote read against Nextcloud: the legacy dialect carries no WebDAV URI, so all access paths targeted the NC server root, and the accept-time probe's error was silently swallowed.

  • remoteBase: explicit protocol.webdav.uri unchanged (Bearer); empty URI resolves the peer's cached Disco.WebdavRoot with live-discovery fallback (spec Share Access step 5).
  • authorize: Basic auth, shared secret as username + X-Requested-With for legacy targets; Bearer otherwise. Wired into IsRemoteDir, ListRemote, FetchRemote — existing stored rows heal without re-sharing.
  • IsRemoteDir recognises the resourcetype collection element (trailing-slash heuristic stays as fallback).
  • Accept path logs probe failures via slog.Warn("ocm folder probe failed", …).
  • TDD: red witnessed on runner (404 probe + collection case) before the implementation splices; full suite green.

Closes #474.

Root cause of "Summer Slam still shows as a file" — and of every remote read against Nextcloud: the legacy dialect carries no WebDAV URI, so all access paths targeted the NC server root, and the accept-time probe's error was silently swallowed. - `remoteBase`: explicit `protocol.webdav.uri` unchanged (Bearer); empty URI resolves the peer's cached `Disco.WebdavRoot` with live-discovery fallback (spec Share Access step 5). - `authorize`: Basic auth, shared secret as username + `X-Requested-With` for legacy targets; Bearer otherwise. Wired into `IsRemoteDir`, `ListRemote`, `FetchRemote` — existing stored rows heal without re-sharing. - `IsRemoteDir` recognises the `resourcetype` `collection` element (trailing-slash heuristic stays as fallback). - Accept path logs probe failures via `slog.Warn("ocm folder probe failed", …)`. - TDD: red witnessed on runner (404 probe + collection case) before the implementation splices; full suite green. Closes #474.
Cordy merged commit d787e683ea into main 2026-09-10 10:31:33 +00:00
Cordy deleted branch fix-474 2026-09-10 10:31:36 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#475
No description provided.