From 9b503c47adfeb7e14d64a462cb44b7e779e048d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Fri, 25 Oct 2024 14:46:15 +0200 Subject: [PATCH] Rephrased --- docs/odata-protocol/odata-protocol.html | 6 +++--- docs/odata-protocol/odata-protocol.md | 12 ++++++------ odata-protocol/8 Header Fields.md | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index b24967f3..50148984 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1210,10 +1210,10 @@

9.1.4 Response Code 204 No Content

-

A request returns 204 No Content if the requested resource has the null value and carries no control information OData-JSON, section 4.6 other than what the minimal metadata format OData-JSON, section 3.1.1 requires and no instance annotations.

-

It also returns 204 No Content if the service applies a return=minimal preference.

-

In these cases, the response body MUST be empty.

+

A request returns 204 No Content if the requested resource has the null value and carries no control information OData-JSON, section 4.6 other than what the minimal metadata format OData-JSON, section 3.1.1 demands and no instance annotations.

If the requested resource has the null value but carries additional control information or instance annotations, the request returns 200 OK instead but omits the context URL from the representation of the response, which then consists of the other control information and instance annotations only.

+

A request always returns 204 No Content if the service applies a return=minimal preference.

+

With response code 204, the response body MUST be empty.

As defined in RFC9110, a Data Modification Request that responds with 204 No Content MAY include an ETag header with a value reflecting the result of the data modification if and only if the client can reasonably “know” the new representation of the resource without actually receiving it. For a PUT request this means that the response body of a corresponding 200 OK or 201 Created response would have been identical to the request body, i.e. no server-side modification of values sent in the request body, no server-calculated values etc. For a PATCH request this means that the response body of a corresponding 200 OK or 201 Created response would have consisted of all values sent in the request body, plus (for values not sent in the request body) server-side values corresponding to the ETag value sent in the If-Match header of the PATCH request, i.e. the previous values “known” to the client.

diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index 40e4fc55..0a6e1ac1 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -1828,18 +1828,18 @@ Requests](#AsynchronousBatchRequests). A request returns `204 No Content` if the requested resource has the `null` value and carries no control information [OData-JSON, section 4.6](https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html#ControlInformation) other than what the minimal metadata format [OData-JSON, section 3.1.1](https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html#metadataminimalodatametadataminimal) -requires and no [instance annotations](#VocabularyExtensibility). - -It also returns `204 No Content` if the service applies a -[`return=minimal`](#Preferencereturnrepresentationandreturnminimal) preference. - -In these cases, the response body MUST be empty. +demands and no [instance annotations](#VocabularyExtensibility). If the requested resource has the `null` value but carries additional control information or instance annotations, the request returns [`200 OK`](#ResponseCode200OK) instead but omits the [context URL](#ContextURL) from the representation of the response, which then consists of the other control information and instance annotations only. +A request always returns `204 No Content` if the service applies a +[`return=minimal`](#Preferencereturnrepresentationandreturnminimal) preference. + +With response code `204`, the response body MUST be empty. + As defined in [RFC9110](#rfc9110), a [Data Modification Request](#DataModification) that responds with `204 No Content` MAY include an [`ETag`](#HeaderETag) header with a value reflecting diff --git a/odata-protocol/8 Header Fields.md b/odata-protocol/8 Header Fields.md index d0988a7f..1ce00e97 100644 --- a/odata-protocol/8 Header Fields.md +++ b/odata-protocol/8 Header Fields.md @@ -932,18 +932,18 @@ Requests](#AsynchronousBatchRequests). A request returns `204 No Content` if the requested resource has the `null` value and carries no control information [#OData-JSON#ControlInformation] other than what the minimal metadata format [#OData-JSON#metadataminimalodatametadataminimal] -requires and no [instance annotations](#VocabularyExtensibility). - -It also returns `204 No Content` if the service applies a -[`return=minimal`](#Preferencereturnrepresentationandreturnminimal) preference. - -In these cases, the response body MUST be empty. +demands and no [instance annotations](#VocabularyExtensibility). If the requested resource has the `null` value but carries additional control information or instance annotations, the request returns [`200 OK`](#ResponseCode200OK) instead but omits the [context URL](#ContextURL) from the representation of the response, which then consists of the other control information and instance annotations only. +A request always returns `204 No Content` if the service applies a +[`return=minimal`](#Preferencereturnrepresentationandreturnminimal) preference. + +With response code `204`, the response body MUST be empty. + As defined in [RFC9110](#rfc9110), a [Data Modification Request](#DataModification) that responds with `204 No Content` MAY include an [`ETag`](#HeaderETag) header with a value reflecting