diff --git a/main/resource-access.bs b/main/resource-access.bs index 9604ddd6..02fccc77 100644 --- a/main/resource-access.bs +++ b/main/resource-access.bs @@ -132,100 +132,28 @@ code. ### Resource type heuristics ### {#resource-type-heuristics} -The semantics of slashes in URI paths are shared ([[#uri-slash-semantics]]). +When creating new resources, servers can determine an effective request URI's +type by examining the URI path ending ([[#uri-slash-semantics]]). -Servers MUST apply the following heuristics to determine the request's -resource type and to construct the effective request URI for the target -resource of an HTTP `POST` -[[Source](https://github.com/solid/specification/issues/128#issuecomment-573033297)]. +Clients who want to assign a URI for their resource, MUST use PUT and PATCH +requests. Servers MAY allow clients to suggest the URI for a resource created +through POST, using the HTTP `Slug` header as defined in [[!RFC5023]]. -The consistency of a request is determined by checking the optional `Link` and -`Slug` headers against the target URI -[[Source](https://github.com/solid/specification/issues/40#issuecomment-566995240)]. +Clients who want the server to determine the URI for their resource, MUST use +the POST request. -Servers supporting the `Slug` header MUST apply the shared slash semantics on -the `slugtext` on requests that also include the `Link` header with -`rel="type"`. +Servers MUST allow creating new resources with a POST request to URI path +ending `/`. Servers MUST create a resource with URI path ending `/{id}` in +container `/`. Servers MUST create a container with URI path ending `/{id}/` +in container `/` for requests including the HTTP `Link` header with +`rel="type"` targeting a valid LDP container type. Servers MUST handle +subsequent requests to the newly created container's URI as if it is a valid +LDP container type by including it the HTTP response's `Link` header. -Issue: -Redefine `slugtext` eg. exclude recursive container creation? -[Related issue](https://github.com/solid/specification/issues/128) +Clients who want to create hierarchical containers MUST use PUT and PATCH +requests. -
`Slug` | -`Link` | -Result | -
---|---|---|
`foo/` | -No `Link` header. | -Create a container with `foo/` appended to the request-URI. | -
foo/ |
- `Link` header with `rel="type"` targeting a valid LDP container - type. | -Create a container with `foo/` appended to the request-URI. | -
foo/ |
- `Link` header without a `rel="type"` targeting a valid LDP container - type. | -Create a resource with `foo` appended to the request-URI, check for - consistency. | -
`foo` | -No `Link` header. | -Create a resource with `foo` appended to the request-URI, check for - consistency. | -
`foo` | -`Link` header with `rel="type"` targeting a valid LDP container - type. | -Create a container with `foo/` appended to the request-URI. | -
`foo` | -`Link` header without a `rel="type"` targeting a valid LDP container - type. | -Create a resource with `foo` appended to the request-URI, check for - consistency. | -
none | -No `Link` header. | -Create a resource with server determined identifier appended to the - request-URI, check for consistency. | -
none | -`Link` header with `rel="type"` targeting a valid LDP container - type. | -Create a container with server determined identifier appended to the - request-URI. | -
none | -`Link` header without a `rel="type"` targeting a valid LDP container - type. | -Create a resource with server determined identifier appended to the - request-URI, check for consistency. | -
- | -