Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specification Targets #56

Open
21 of 25 tasks
jeff-zucker opened this issue Nov 18, 2020 · 2 comments
Open
21 of 25 tasks

Specification Targets #56

jeff-zucker opened this issue Nov 18, 2020 · 2 comments

Comments

@jeff-zucker
Copy link
Member

jeff-zucker commented Nov 18, 2020

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

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

WRITING 2.4.3

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

DELETING 2.4.4

  • send 405 on attempt to delete a storage's root container
  • do not send DELETE in Allow header for root container
  • when deleting a resource, its aux resources MUST be deleted
  • attempt to delete non-empty container MUST send 409 and show error in body
  • Write access is required to delete a resource (other than ACL)
  • 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

  • MUST not block requests due to CORS or different origins

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

@CxRes
Copy link
Contributor

CxRes commented Mar 3, 2024

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.

@jeff-zucker
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants