solid-rest icon indicating copy to clipboard operation
solid-rest copied to clipboard

Specification Targets

Open jeff-zucker opened this issue 4 years ago • 2 comments

My summary of how Solid-Rest should behave to be spec-compliant (other than requirements for http, CORS, and WAC) :

https://solid.github.io/specification/#read-write (2020-10-29)

Updated 2020-12-15

READING 2.4.2

  • [x] unsupported HTTP methods should return 405
  • [x] trailing slash always denotes a container
  • [ ] can not have both "/path/foo/" and "/path/foo"
  • [x] GET, HEAD, and OPTIONS MUST be supported
  • [x] response headers for Accept-Patch & Accept-Post MUST list supported media types in GET and HEAD requests and MAY list them in OPTIONS requests
  • [x] MUST send 400 on PUT, POST, or PATCH that lacks content-type header (2.1.2)

WRITING 2.4.3

  • [x] intermediate containers MUST be created for PUT and PATCH
  • [x] a Link header indicating something is a container MUST be in the response to requests to container URLs (those ending in slash)
  • [x] POST should return 404 if the parent folder of the resource doesn't pre-exist
  • [x] PUT and PATCH to an aux resource MUST create or update it
  • [x] POST to an aux resource MUST return 403 and a body describing the error if the request has a slug
  • [x] requests to update a container's containment triples MUST faile with 409
  • [ ] MAY send If-None-Match header of "*" and support ETag headers
  • [x] only those with Control on a resource may access its ACL resource

DELETING 2.4.4

  • [x] send 405 on attempt to delete a storage's root container
  • [x] do not send DELETE in Allow header for root container
  • [x] when deleting a resource, its aux resources MUST be deleted
  • [x] attempt to delete non-empty container MUST send 409 and show error in body
  • [x] Write access is required to delete a resource (other than ACL)
  • [x] Control access on a resource is required to deleta its ACL

REPRESENTATIONS 2.4.5

  • [ ] a resource's content-type MUST be determined from the header used in its creation
  • [ ] servers MUST honor a request's Accept header if it specifies "text/turtle" or "application/ld+json"

CROSS-ORIGN RESOURCE SHARING 2.8

  • [x] MUST not block requests due to CORS or different origins

LDP Spec https://www.w3.org/TR/ldp/

  • [x] Link http://www.w3.org/ns/ldp#Resource must be returned in all headers
  • [x] should respond with text/turtle if no Aceept header is present

jeff-zucker avatar Nov 18 '20 23:11 jeff-zucker

I don't understand this:

can not have both "/path/foo/" and "/path/foo"

Preferred behaviour (of implementations) is to redirect from "/path/foo" -> "/path/foo/" (if folder), but not the other way around.

CxRes avatar Mar 03 '24 03:03 CxRes

I don't understand this:

can not have both "/path/foo/" and "/path/foo"

If /path/foo/ exists and user tries to create /path/foo, the server should cowardly refuse and the same in the opposite case. As you say, once one of the exists, then the behavior you described happens.

jeff-zucker avatar Mar 03 '24 03:03 jeff-zucker