From 39da028e533d558273bbbb45cd9bb3e981b05866 Mon Sep 17 00:00:00 2001 From: Kjetil Kjernsmo Date: Fri, 29 Oct 2021 23:45:49 +0200 Subject: [PATCH 01/10] Add initial consistency requirement --- protocol.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/protocol.html b/protocol.html index 1f5a6bad..566dfd86 100644 --- a/protocol.html +++ b/protocol.html @@ -665,6 +665,10 @@

Resource Type Heuristics

When a successful POST request creates a resource, the server MUST assign a URI to that resource. Servers MAY allow clients to suggest the URI of a resource created through POST, using the HTTP Slug header as defined in [RFC5023].

+

+ Servers MUST only accept requests where there is consistency between the path ending (URI Slash Semantics), any HTTP Link headers with rel="type" and the media type given in the Content-Type header of the request. +

+

Note: URI Allocation

From cfa3e247a8876951fd36418bc95e3b2bd6711ba7 Mon Sep 17 00:00:00 2001 From: Kjetil Kjernsmo Date: Fri, 29 Oct 2021 23:56:04 +0200 Subject: [PATCH 02/10] Suggest 409 for now --- protocol.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protocol.html b/protocol.html index 566dfd86..1a4bfaf0 100644 --- a/protocol.html +++ b/protocol.html @@ -666,7 +666,8 @@

Resource Type Heuristics

When a successful POST request creates a resource, the server MUST assign a URI to that resource. Servers MAY allow clients to suggest the URI of a resource created through POST, using the HTTP Slug header as defined in [RFC5023].

- Servers MUST only accept requests where there is consistency between the path ending (URI Slash Semantics), any HTTP Link headers with rel="type" and the media type given in the Content-Type header of the request. + Servers MUST only accept requests where there is consistency between the path ending (URI Slash Semantics), any HTTP Link headers with rel="type" and the media type given in the Content-Type header of the request. + Servers MUST reject inconsistent requests a 409 status code.

From cf35d3376ecca02ad532417d9721af70f0a7fd52 Mon Sep 17 00:00:00 2001 From: Kjetil Kjernsmo Date: Sat, 30 Oct 2021 00:05:50 +0200 Subject: [PATCH 03/10] Add #301 as source --- protocol.html | 1 + 1 file changed, 1 insertion(+) diff --git a/protocol.html b/protocol.html index 1a4bfaf0..bd9238f0 100644 --- a/protocol.html +++ b/protocol.html @@ -668,6 +668,7 @@

Resource Type Heuristics

Servers MUST only accept requests where there is consistency between the path ending (URI Slash Semantics), any HTTP Link headers with rel="type" and the media type given in the Content-Type header of the request. Servers MUST reject inconsistent requests a 409 status code. + [Source]

From 928cfc979f8bb3061cdbdb7138ba0cc59b4c6828 Mon Sep 17 00:00:00 2001 From: Kjetil Kjernsmo Date: Sat, 30 Oct 2021 00:29:04 +0200 Subject: [PATCH 04/10] Improve around status code --- protocol.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol.html b/protocol.html index bd9238f0..234f65b1 100644 --- a/protocol.html +++ b/protocol.html @@ -667,7 +667,7 @@

Resource Type Heuristics

Servers MUST only accept requests where there is consistency between the path ending (URI Slash Semantics), any HTTP Link headers with rel="type" and the media type given in the Content-Type header of the request. - Servers MUST reject inconsistent requests a 409 status code. + Servers MUST reject inconsistent requests using a 409 or 415 status code as per Section 4.3.4 of [RFC7231]. [Source]

From ee05279c88136fc17870536beb26ecffe42ce1fc Mon Sep 17 00:00:00 2001 From: Kjetil Kjernsmo Date: Sat, 30 Oct 2021 00:30:10 +0200 Subject: [PATCH 05/10] Add note to further explain --- protocol.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/protocol.html b/protocol.html index 234f65b1..77b26ca6 100644 --- a/protocol.html +++ b/protocol.html @@ -671,6 +671,15 @@

Resource Type Heuristics

[Source]

+
+

Note: Interpretation of Resource Types

+
+

+ Clients and servers may indicate resource types using a HTTP Link headers with rel="type", but should be aware that they come with assumptions as to what media types can be associated with them. In particular, Solid requires containers to be represented by a RDF Document, which again requires an appropriate RDF serialization with a corresponding media type for consistency. Other media types may have similar consistency requirements. +

+
+
+

Note: URI Allocation

From afa8cdce89c96bd14a1a4c76d7cdbc08d5faee39 Mon Sep 17 00:00:00 2001 From: Kjetil Kjernsmo Date: Sat, 30 Oct 2021 00:49:21 +0200 Subject: [PATCH 06/10] Proposed wording for consistence with existing resources --- protocol.html | 1 + 1 file changed, 1 insertion(+) diff --git a/protocol.html b/protocol.html index 77b26ca6..7a11b88d 100644 --- a/protocol.html +++ b/protocol.html @@ -668,6 +668,7 @@

Resource Type Heuristics

Servers MUST only accept requests where there is consistency between the path ending (URI Slash Semantics), any HTTP Link headers with rel="type" and the media type given in the Content-Type header of the request. Servers MUST reject inconsistent requests using a 409 or 415 status code as per Section 4.3.4 of [RFC7231]. + When a server recieves a request that attempts to change the resource type, it MUST must verify that the resource type of the request is compatible with the current resource type and reject the requests using a 409 status code if it is not. [Source]

From c2ce563f83a20a334c5ea81ed02838c2e9c48754 Mon Sep 17 00:00:00 2001 From: Kjetil Kjernsmo Date: Mon, 1 Nov 2021 10:52:41 +0100 Subject: [PATCH 07/10] Remove a must Co-authored-by: Aaron Coburn --- protocol.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol.html b/protocol.html index 7a11b88d..7a54f3ea 100644 --- a/protocol.html +++ b/protocol.html @@ -668,7 +668,7 @@

Resource Type Heuristics

Servers MUST only accept requests where there is consistency between the path ending (URI Slash Semantics), any HTTP Link headers with rel="type" and the media type given in the Content-Type header of the request. Servers MUST reject inconsistent requests using a 409 or 415 status code as per Section 4.3.4 of [RFC7231]. - When a server recieves a request that attempts to change the resource type, it MUST must verify that the resource type of the request is compatible with the current resource type and reject the requests using a 409 status code if it is not. + When a server recieves a request that attempts to change the resource type, it MUST verify that the resource type of the request is compatible with the current resource type and reject the requests using a 409 status code if it is not. [Source]

From c6f422b4d291071ee3cdc5cdf61a653688cdfb46 Mon Sep 17 00:00:00 2001 From: Kjetil Kjernsmo Date: Mon, 1 Nov 2021 11:13:12 +0100 Subject: [PATCH 08/10] Add comments on status code per @RubenVerborgh's suggestion --- protocol.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol.html b/protocol.html index 7a54f3ea..3c82fa68 100644 --- a/protocol.html +++ b/protocol.html @@ -667,7 +667,7 @@

Resource Type Heuristics

Servers MUST only accept requests where there is consistency between the path ending (URI Slash Semantics), any HTTP Link headers with rel="type" and the media type given in the Content-Type header of the request. - Servers MUST reject inconsistent requests using a 409 or 415 status code as per Section 4.3.4 of [RFC7231]. + Servers MUST reject inconsistent requests using a 415 (for media type inconsistency) or 409 (for all other inconsistencies)status code as per Section 4.3.4 of [RFC7231]. When a server recieves a request that attempts to change the resource type, it MUST verify that the resource type of the request is compatible with the current resource type and reject the requests using a 409 status code if it is not. [Source]

From c3258730caabc26a52e543261d5db0c2b6448d1d Mon Sep 17 00:00:00 2001 From: Kjetil Kjernsmo Date: Mon, 1 Nov 2021 11:16:40 +0100 Subject: [PATCH 09/10] Fix typos --- protocol.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol.html b/protocol.html index 3c82fa68..373b8535 100644 --- a/protocol.html +++ b/protocol.html @@ -668,7 +668,7 @@

Resource Type Heuristics

Servers MUST only accept requests where there is consistency between the path ending (URI Slash Semantics), any HTTP Link headers with rel="type" and the media type given in the Content-Type header of the request. Servers MUST reject inconsistent requests using a 415 (for media type inconsistency) or 409 (for all other inconsistencies)status code as per Section 4.3.4 of [RFC7231]. - When a server recieves a request that attempts to change the resource type, it MUST verify that the resource type of the request is compatible with the current resource type and reject the requests using a 409 status code if it is not. + When a server receives a request that attempts to change the resource type, it MUST verify that the resource type of the request is compatible with the current resource type and reject the requests using a 409 status code if it is not. [Source]

@@ -676,7 +676,7 @@

Resource Type Heuristics

Note: Interpretation of Resource Types

- Clients and servers may indicate resource types using a HTTP Link headers with rel="type", but should be aware that they come with assumptions as to what media types can be associated with them. In particular, Solid requires containers to be represented by a RDF Document, which again requires an appropriate RDF serialization with a corresponding media type for consistency. Other media types may have similar consistency requirements. + Clients and servers may indicate resource types using a HTTP Link headers with rel="type", but should be aware that they come with assumptions as to what media types can be associated with them. In particular, Solid requires containers to be represented by an RDF Document, which again requires an appropriate RDF serialization with a corresponding media type for consistency. Other media types may have similar consistency requirements.

From c17376cf6e67c34bc20127a424cb33d9a429ef9d Mon Sep 17 00:00:00 2001 From: Kjetil Kjernsmo Date: Mon, 1 Nov 2021 11:34:00 +0100 Subject: [PATCH 10/10] add whitespace --- protocol.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol.html b/protocol.html index 373b8535..6fb8d509 100644 --- a/protocol.html +++ b/protocol.html @@ -667,7 +667,7 @@

Resource Type Heuristics

Servers MUST only accept requests where there is consistency between the path ending (URI Slash Semantics), any HTTP Link headers with rel="type" and the media type given in the Content-Type header of the request. - Servers MUST reject inconsistent requests using a 415 (for media type inconsistency) or 409 (for all other inconsistencies)status code as per Section 4.3.4 of [RFC7231]. + Servers MUST reject inconsistent requests using a 415 (for media type inconsistency) or 409 (for all other inconsistencies) status code as per Section 4.3.4 of [RFC7231]. When a server receives a request that attempts to change the resource type, it MUST verify that the resource type of the request is compatible with the current resource type and reject the requests using a 409 status code if it is not. [Source]