Description
Problem
PodOS/mashlib cannot create new resources because 404 responses don't include the headers that tell rdflib what editing protocols are supported.
When rdflib tries to create a new resource, it first does a GET to check if it exists. If it gets a 404 without Accept-Patch and Accept-Put headers, it doesn't know how to create the resource.
Error from PodOS:
Can't create new resources with PodOS. You may need to add accept-patch header to 404 resources, so that rdflib can figure out how to create it.
Exception in update: Error: Update: Loaded http://localhost:3210/something-new but still can't figure out what editing protocol it supports.
Solution
Add Accept-Patch, Accept-Put, and Allow headers to all 404 responses so clients know what methods are available for creating resources.
Headers added to 404 responses:
Accept-Patch: text/n3, application/sparql-updateAccept-Put: application/ld+json, text/turtle, */*Allow: GET, HEAD, PUT, PATCH, OPTIONSLink: <resource.acl>; rel="acl"- CORS headers
Affected handlers
handleGet- GET requests for non-existent resourceshandleHead- HEAD requests for non-existent resourceshandleDelete- DELETE requests for non-existent resourceshandlePatch- PATCH requests for non-existent resources
Activity
Address second Copilot round on JavaScriptSolidServer#281
Address copilot pass 1 on #400
auth: NIP-98 → WebID via verificationMethod lookup (#399) (#400)
Address copilot pass 9 on #408
auth: serve /.well-known/did/nostr/<pubkey>.json (#407) (#408)
review pass-3 (#539): log payload preserves stack + mock matches Node…
fix(idp): handleSchnorrComplete recovers from interactionFinished thr…