PlcClient: all DID-path requests break — 'did:plc:…' parses as an absolute URI and bypasses BaseAddress #47
Labels
No labels
breaking-change
bug
documentation
duplicate
enhancement
good first issue
help wanted
performance
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/ATProto.NET#47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Every
PlcClientrequest that puts the DID in the path fails with:Cause:
_httpClient.GetAsync(did, …)(and$"{did}/log"etc.) passes a string likedid:plc:xyzto HttpClient, anddid:plc:xyzparses as an absolute URI with schemedid— so the configuredBaseAddress(https://plc.directory/) is ignored and SocketsHttpHandler rejects the scheme. Affected call sites:ResolveDidAsync,GetOperationLogAsync,GetAuditLogAsync,GetLastOperationAsync,GetPlcDataAsync(PlcClient.cs lines 68/101/121/141/164)._healthis fine.Fix: prefix the relative reference per RFC 3986 —
_httpClient.GetAsync("./" + did, …)— so it combines with BaseAddress tohttps://plc.directory/did:plc:xyz.Found in the wild: Mise's backfill resolved 0/59 repos because every
did:plclookup failed. Presumably unit tests never hit this because they stub the handler with absolute expectations or use the two-arg HttpClient ctor differently; an integration test against plc.directory would have caught it.