From 0e820c87437fa3f1509a169da8266733cd86edae Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 28 May 2024 10:13:50 +0200 Subject: [PATCH 1/4] Clarify requests including content; container creation; omit slug targetting auxiliary --- ED/protocol.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ED/protocol.html b/ED/protocol.html index a50aa3c8..9a6ff0ec 100644 --- a/ED/protocol.html +++ b/ED/protocol.html @@ -746,7 +746,7 @@

HTTP Server

Server MUST generate a Content-Type header field in a message that contains content.

-

Server MUST reject PUT, POST and PATCH requests without the Content-Type header field with a status code of 400. [Source]

+

Server MUST reject PUT, POST and PATCH requests containing content but without the Content-Type header field with a status code of 400. [Source]

@@ -757,7 +757,7 @@

HTTP Client

When a client receives a response with a 403 or 404 status code, the client MAY repeat the request with different credentials.

-

Clients MUST use the Content-Type HTTP header field in PUT, POST, and PATCH requests [RFC9110]. [Source]

+

Clients MUST use the Content-Type HTTP header field in PUT, POST, and PATCH requests containing content [RFC9110]. [Source]

@@ -1022,11 +1022,11 @@

Writing Resources

Servers MUST create intermediate containers and include corresponding containment triples in container representations derived from the URI path component of PUT and PATCH requests. [Source]

-

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. [Source] [Source]

+

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 /. [Source] [Source]

When a POST method request targets a resource without an existing representation, the server MUST respond with the 404 status code. [Source]

-

When a PUT or PATCH method request targets an auxiliary resource, the server MUST create or update it. When a POST method request with the Slug header targets an auxiliary resource, the server MUST respond with the 403 status code and response body describing the error. [Source]

+

When a PUT or PATCH method request targets an auxiliary resource, the server MUST create or update it. [Source]

Servers MUST NOT allow HTTP PUT or PATCH on a container to update its containment triples; if the server receives such a request, it MUST respond with a 409 status code. [Source]

From 2611d74a25f8527baf534e887e16e517cb147391 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 30 May 2024 22:37:19 +0200 Subject: [PATCH 2/4] Apply suggestions from code review Co-authored-by: Ted Thibodeau Jr --- ED/protocol.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ED/protocol.html b/ED/protocol.html index 9a6ff0ec..469e1891 100644 --- a/ED/protocol.html +++ b/ED/protocol.html @@ -746,7 +746,7 @@

HTTP Server

Server MUST generate a Content-Type header field in a message that contains content.

-

Server MUST reject PUT, POST and PATCH requests containing content but without the Content-Type header field with a status code of 400. [Source]

+

Server MUST reject PUT, POST, and PATCH requests that contain content but lack the Content-Type header field, with a status code of 400. [Source]

@@ -757,7 +757,7 @@

HTTP Client

When a client receives a response with a 403 or 404 status code, the client MAY repeat the request with different credentials.

-

Clients MUST use the Content-Type HTTP header field in PUT, POST, and PATCH requests containing content [RFC9110]. [Source]

+

Clients MUST use the Content-Type HTTP header field in PUT, POST, and PATCH requests that contain content [RFC9110]. [Source]

@@ -1022,11 +1022,11 @@

Writing Resources

Servers MUST create intermediate containers and include corresponding containment triples in container representations derived from the URI path component of PUT and PATCH requests. [Source]

-

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 /. [Source] [Source]

+

Servers MUST allow creation of new resources by a POST request to a URI path ending with /. Servers MUST create resources with URI paths ending with /{id} in container /. [Source] [Source]

When a POST method request targets a resource without an existing representation, the server MUST respond with the 404 status code. [Source]

-

When a PUT or PATCH method request targets an auxiliary resource, the server MUST create or update it. [Source]

+

When a PUT or PATCH request targets an auxiliary resource, the server MUST create or update it. [Source]

Servers MUST NOT allow HTTP PUT or PATCH on a container to update its containment triples; if the server receives such a request, it MUST respond with a 409 status code. [Source]

From f64d2ce5f121778f4878a5e7f53692ff5f5226a5 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 1 Jun 2024 17:14:11 +0200 Subject: [PATCH 3/4] Update changelog based on https://github.com/solid/specification/pull/660 --- ED/protocol.html | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/ED/protocol.html b/ED/protocol.html index 469e1891..5c7479b9 100644 --- a/ED/protocol.html +++ b/ED/protocol.html @@ -746,7 +746,7 @@

HTTP Server

Server MUST generate a Content-Type header field in a message that contains content.

-

Server MUST reject PUT, POST, and PATCH requests that contain content but lack the Content-Type header field, with a status code of 400. [Source]

+

Server MUST reject PUT, POST, and PATCH requests that contain content but lack the Content-Type header field, with a status code of 400. [Source] [Source]

@@ -757,7 +757,7 @@

HTTP Client

When a client receives a response with a 403 or 404 status code, the client MAY repeat the request with different credentials.

-

Clients MUST use the Content-Type HTTP header field in PUT, POST, and PATCH requests that contain content [RFC9110]. [Source]

+

Clients MUST use the Content-Type HTTP header field in PUT, POST, and PATCH requests that contain content [RFC9110]. [Source] [Source]

@@ -1581,7 +1581,26 @@

Changelog

2 #server-slug-uri-assignment - Remove optional requirement for Slug that is not enhancing the product classes. + + + 3 + #server-content-type-missing + Amend server requirement to clarify rejecting messages with content but lacking the Content-Type header field. + + + 3 + #client-content-type-includes + Amend client requirement to clarify requesting messages with content to include the Content-Type header field. + + + 3 + #server-post-container-create-container + Remove requirement as creating a container with a server-assigned URI is not significant and relied on the LDP interaction model. + + + 3 + #server-post-slug-auxiliary-resource + Remove requirement as the Slug header field is not widely implemented and should not be used to match any resource. From 7527c9b30b09e78984c1c494b425ea4bfbc774af Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 3 Jun 2024 12:04:33 +0200 Subject: [PATCH 4/4] Add missing statement for Change about server-slug-uri-assignment --- ED/protocol.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ED/protocol.html b/ED/protocol.html index 5c7479b9..672f69dd 100644 --- a/ED/protocol.html +++ b/ED/protocol.html @@ -1581,6 +1581,7 @@

Changelog

2 #server-slug-uri-assignment + Remove optional requirement for Slug that is not enhancing the product classes. 3