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

325 byte order mark in text/plain #2017

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions docs/odata-protocol/odata-protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,16 @@ <h2 id="11-changes-from-earlier-versions"><a id="ChangesfromEarlierVersions" hre
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/368">368</a></td>
</tr>
<tr class="odd">
<td><a href="#RequestingaRawValueusingvalue">Section 11.2.4.2</a></td>
<td>Use of <code>charset</code> parameter in responses to <code>/$value</code></td>
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/325">325</a></td>
</tr>
<tr class="even">
<td><a href="#RequestingtheNumberofItemsinaCollection">Section 11.2.10</a></td>
<td>Only digits in a response to <code>/$count</code></td>
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/325">325</a></td>
</tr>
<tr class="odd">
<td><a href="#DataModification">Section 11.4</a></td>
<td>Response code <code>204 No Content</code> after successful data modification if requested response could not be constructed</td>
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/443">443</a></td>
Expand Down Expand Up @@ -1743,8 +1753,10 @@ <h4 id="11242-requesting-a-raw-value-using-value"><a id="RequestingaRawValueusin
<p>To retrieve the raw value of a primitive property or operation result, the client sends a <code>GET</code> request to the raw value URL. See the <a href="#ODataURL">OData-URL</a> document for details.</p>
<p>The <code>Content-Type</code> of the response is determined using the <code>Accept</code> header and the <a href="#SystemQueryOptionformat"><code>$format</code></a> system query option.</p>
<p>The default format for <code>Edm.Binary</code> is the format specified by the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#MediaType"><code>Core.MediaType</code></a> annotation (see <a href="#ODataVocCore">OData-VocCore</a>) if this annotation is present. If not annotated, the format cannot be predicted by the client.</p>
<p>The default format for <code>Edm.Geo</code> types is <code>text/plain</code> using the WKT (well-known text) format, see rules <code>fullCollectionLiteral</code>, <code>fullLineStringLiteral</code>, <code>fullMultiPointLiteral</code>, <code>fullMultiLineStringLiteral</code>, <code>fullMultiPolygonLiteral</code>, <code>fullPointLiteral</code>, and <code>fullPolygonLiteral</code> in <a href="#ODataABNF">OData-ABNF</a>.</p>
<p>The default format for single primitive values except <code>Edm.Binary</code> and the <code>Edm.Geo</code> types is <code>text/plain</code>. Responses of type <code>Edm.String</code> can use the <code>charset</code> format parameter to specify the character set used for representing the string value. Responses for the other primitive types follow the rules <code>booleanValue</code>, <code>byteValue</code>, <code>dateValue</code>, <code>dateTimeOffsetValue</code>, <code>decimalValue</code>, <code>doubleValue</code>, <code>durationValue</code>, <code>enumValue</code>, <code>guidValue</code>, <code>int16Value</code>, <code>int32Value</code>, <code>int64Value</code>, <code>sbyteValue</code>, <code>singleValue</code>, and <code>timeOfDayValue</code> in <a href="#ODataABNF">OData-ABNF</a>.</p>
<p>The default format for <code>Edm.Geo</code> types is <code>text/plain</code> without <code>charset</code> parameter, using the WKT (well-known text) format, see rules <code>fullCollectionLiteral</code>, <code>fullLineStringLiteral</code>, <code>fullMultiPointLiteral</code>, <code>fullMultiLineStringLiteral</code>, <code>fullMultiPolygonLiteral</code>, <code>fullPointLiteral</code>, and <code>fullPolygonLiteral</code> in <a href="#ODataABNF">OData-ABNF</a>.</p>
<p>The default format for single primitive values except <code>Edm.Binary</code> and the <code>Edm.Geo</code> types is <code>text/plain</code>.</p>
<p>Responses for type <code>Edm.String</code> MAY use the <code>charset</code> format parameter to specify the character set used for representing the string value; omission of the <code>charset</code> parameter implies the default character set <code>US-ASCII</code>.</p>
<p>Responses for the other primitive types follow the rules <code>booleanValue</code>, <code>byteValue</code>, <code>dateValue</code>, <code>dateTimeOffsetValue</code>, <code>decimalValue</code>, <code>doubleValue</code>, <code>durationValue</code>, <code>enumValue</code>, <code>guidValue</code>, <code>int16Value</code>, <code>int32Value</code>, <code>int64Value</code>, <code>sbyteValue</code>, <code>singleValue</code>, and <code>timeOfDayValue</code> in <a href="#ODataABNF">OData-ABNF</a>; they MUST NOT use the <code>charset</code> parameter, this implies the default character set <code>US-ASCII</code>, see <a href="#rfc2046">RFC2046</a>, <a href="https://www.rfc-editor.org/rfc/rfc2046.html#section-4.1.2">section 4.1.2</a>.</p>
<p>A raw value request for a property or operation result of type <code>Edm.Stream</code> returns <code>400 Bad Request</code>.</p>
<p>A raw value request for a property or operation result that is <code>null</code> results in a <a href="#ResponseCode204NoContent"><code>204 No Content</code></a> response.</p>
<p>If the property or operation result is not available, for example due to permissions, the service responds with <a href="#ResponseCode404NotFound"><code>404 Not Found</code></a>.</p>
Expand Down Expand Up @@ -2163,7 +2175,8 @@ <h3 id="1129-resolving-an-entity-id"><a id="ResolvinganEntityId" href="#Resolvin
<h3 id="11210-requesting-the-number-of-items-in-a-collection"><a id="RequestingtheNumberofItemsinaCollection" href="#RequestingtheNumberofItemsinaCollection">11.2.10 Requesting the Number of Items in a Collection</a></h3>
</summary>
<p>To request only the number of items of a collection of entities or items of a collection-valued property, the client issues a <code>GET</code> request with <code>/$count</code> appended to the resource path of the collection.</p>
<p>On success, the response body MUST contain the exact count of items matching the request after applying any <a href="#SystemQueryOptionfilter"><code>$filter</code></a> or <a href="#SystemQueryOptionsearch"><code>$search</code></a> system query options, formatted as a simple primitive integer value with media type <code>text/plain</code>. Clients SHOULD NOT combine the system query options <a href="#SystemQueryOptiontop"><code>$top</code></a>, <a href="#SystemQueryOptionskip"><code>$skip</code></a>, <a href="#SystemQueryOptionorderby"><code>$orderby</code></a>, <a href="#SystemQueryOptionexpand"><code>$expand</code></a>, and <a href="#SystemQueryOptionformat"><code>$format</code></a> with the path suffix <code>/$count</code>. The result of such a request is undefined.</p>
<p>On success, the response body MUST contain the exact count of items matching the request after applying any <a href="#SystemQueryOptionfilter"><code>$filter</code></a> or <a href="#SystemQueryOptionsearch"><code>$search</code></a> system query options, formatted as a simple primitive integer value with media type <code>text/plain</code> without <code>charset</code> parameter, and the response body following rule <code>1*DIGIT</code>, see <a href="#ODataABNF">OData-ABNF</a>.</p>
<p>Clients SHOULD NOT combine the system query options <a href="#SystemQueryOptiontop"><code>$top</code></a>, <a href="#SystemQueryOptionskip"><code>$skip</code></a>, <a href="#SystemQueryOptionorderby"><code>$orderby</code></a>, <a href="#SystemQueryOptionexpand"><code>$expand</code></a>, and <a href="#SystemQueryOptionformat"><code>$format</code></a> with the path suffix <code>/$count</code>. The result of such a request is undefined.</p>
<div class="example">
<p>Example 69: return the number of products in the Products entity set</p>
<pre><code>GET http://host/service/Products/$count</code></pre>
Expand Down
23 changes: 15 additions & 8 deletions docs/odata-protocol/odata-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ Section | Feature / Change | Issue
--------|------------------|------
[Section 8.2.8.3](#Preferencecontinueonerrorodatacontinueonerror) | Responses that include errors MUST include the `Preference-Applied` header with `continue-on-error` set to `true` | [1965](https://github.com/oasis-tcs/odata-specs/issues/1965)
[Section 10.2](#CollectionofEntities)| Context URLs use parentheses-style keys without percent-encoding| [368](https://github.com/oasis-tcs/odata-specs/issues/368)
[Section 11.2.4.2](#RequestingaRawValueusingvalue)| Use of `charset` parameter in responses to `/$value` | [325](https://github.com/oasis-tcs/odata-specs/issues/325)
[Section 11.2.10](#RequestingtheNumberofItemsinaCollection)| Only digits in a response to `/$count` | [325](https://github.com/oasis-tcs/odata-specs/issues/325)
[Section 11.4](#DataModification)| Response code `204 No Content` after successful data modification if requested response could not be constructed| [443](https://github.com/oasis-tcs/odata-specs/issues/443)
[Section 11.4.2](#CreateanEntity)| Services can validate non-insertable property values in insert payloads| [356](https://github.com/oasis-tcs/odata-specs/issues/356)
[Section 11.4.3](#UpdateanEntity)| Services can validate non-updatable property values in update payloads| [356](https://github.com/oasis-tcs/odata-specs/issues/356)
Expand Down Expand Up @@ -2817,22 +2819,25 @@ annotation (see [OData-VocCore](#ODataVocCore)) if this
annotation is present. If not annotated, the format cannot be predicted
by the client.

The default format for `Edm.Geo` types is `text/plain` using the WKT
The default format for `Edm.Geo` types is `text/plain` without `charset` parameter, using the WKT
(well-known text) format, see rules `fullCollectionLiteral`,
`fullLineStringLiteral`, `fullMultiPointLiteral`,
`fullMultiLineStringLiteral`, `fullMultiPolygonLiteral`,
`fullPointLiteral`, and `fullPolygonLiteral` in
[OData-ABNF](#ODataABNF).

The default format for single primitive values except `Edm.Binary` and
the `Edm.Geo` types is `text/plain`. Responses of type
`Edm.String` can use the `charset` format parameter to specify the
character set used for representing the string value. Responses for the
other primitive types follow the rules `booleanValue`, `byteValue`,
the `Edm.Geo` types is `text/plain`.

Responses for type `Edm.String` MAY use the `charset` format parameter to specify the
character set used for representing the string value; omission of the `charset` parameter implies the default character set `US-ASCII`.

Responses for the other primitive types follow the rules `booleanValue`, `byteValue`,
`dateValue`, `dateTimeOffsetValue`, `decimalValue`, `doubleValue`,
`durationValue`, `enumValue`, `guidValue`, `int16Value`, `int32Value`,
`int64Value`, `sbyteValue`, `singleValue`, and `timeOfDayValue` in
[OData-ABNF](#ODataABNF).
[OData-ABNF](#ODataABNF); they MUST NOT use the `charset` parameter, this implies the default character set `US-ASCII`,
see [RFC2046](#rfc2046), [section 4.1.2](https://www.rfc-editor.org/rfc/rfc2046.html#section-4.1.2).

A raw value request for a property or operation result of type `Edm.Stream`
returns `400 Bad Request`.
Expand Down Expand Up @@ -3707,8 +3712,10 @@ On success, the response body MUST contain the exact count of items
matching the request after applying any
[`$filter`](#SystemQueryOptionfilter) or
[`$search`](#SystemQueryOptionsearch) system query options, formatted as
a simple primitive integer value with media type `text/plain`. Clients
SHOULD NOT combine the system query options
a simple primitive integer value with media type `text/plain` without `charset` parameter,
and the response body following rule `1*DIGIT`, see [OData-ABNF](#ODataABNF).

Clients SHOULD NOT combine the system query options
[`$top`](#SystemQueryOptiontop),
[`$skip`](#SystemQueryOptionskip),
[`$orderby`](#SystemQueryOptionorderby),
Expand Down
2 changes: 2 additions & 0 deletions odata-protocol/1 Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Section | Feature / Change | Issue
[Section ##CollectionofEntities]|
Context URLs use parentheses-style keys without percent-encoding|
[368](https://github.com/oasis-tcs/odata-specs/issues/368)
[Section ##RequestingaRawValueusingvalue]| Use of `charset` parameter in responses to `/$value` | [325](https://github.com/oasis-tcs/odata-specs/issues/325)
[Section ##RequestingtheNumberofItemsinaCollection]| Only digits in a response to `/$count` | [325](https://github.com/oasis-tcs/odata-specs/issues/325)
[Section ##DataModification]|
Response code `204 No Content` after successful data modification if requested response could not be constructed|
[443](https://github.com/oasis-tcs/odata-specs/issues/443)
Expand Down
21 changes: 13 additions & 8 deletions odata-protocol/11 Data Service Requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,22 +255,25 @@ annotation (see [OData-VocCore](#ODataVocCore)) if this
annotation is present. If not annotated, the format cannot be predicted
by the client.

The default format for `Edm.Geo` types is `text/plain` using the WKT
The default format for `Edm.Geo` types is `text/plain` without `charset` parameter, using the WKT
(well-known text) format, see rules `fullCollectionLiteral`,
`fullLineStringLiteral`, `fullMultiPointLiteral`,
`fullMultiLineStringLiteral`, `fullMultiPolygonLiteral`,
`fullPointLiteral`, and `fullPolygonLiteral` in
[OData-ABNF](#ODataABNF).

The default format for single primitive values except `Edm.Binary` and
the `Edm.Geo` types is `text/plain`. Responses of type
`Edm.String` can use the `charset` format parameter to specify the
character set used for representing the string value. Responses for the
other primitive types follow the rules `booleanValue`, `byteValue`,
the `Edm.Geo` types is `text/plain`.

Responses for type `Edm.String` MAY use the `charset` format parameter to specify the
character set used for representing the string value; omission of the `charset` parameter implies the default character set `US-ASCII`.

Responses for the other primitive types follow the rules `booleanValue`, `byteValue`,
`dateValue`, `dateTimeOffsetValue`, `decimalValue`, `doubleValue`,
`durationValue`, `enumValue`, `guidValue`, `int16Value`, `int32Value`,
`int64Value`, `sbyteValue`, `singleValue`, and `timeOfDayValue` in
[OData-ABNF](#ODataABNF).
[OData-ABNF](#ODataABNF); they MUST NOT use the `charset` parameter, this implies the default character set `US-ASCII`,
see [RFC2046](#rfc2046), [section 4.1.2](https://www.rfc-editor.org/rfc/rfc2046.html#section-4.1.2).

A raw value request for a property or operation result of type `Edm.Stream`
returns `400 Bad Request`.
Expand Down Expand Up @@ -1145,8 +1148,10 @@ On success, the response body MUST contain the exact count of items
matching the request after applying any
[`$filter`](#SystemQueryOptionfilter) or
[`$search`](#SystemQueryOptionsearch) system query options, formatted as
a simple primitive integer value with media type `text/plain`. Clients
SHOULD NOT combine the system query options
a simple primitive integer value with media type `text/plain` without `charset` parameter,
HeikoTheissen marked this conversation as resolved.
Show resolved Hide resolved
and the response body following rule `1*DIGIT`, see [OData-ABNF](#ODataABNF).

Clients SHOULD NOT combine the system query options
[`$top`](#SystemQueryOptiontop),
[`$skip`](#SystemQueryOptionskip),
[`$orderby`](#SystemQueryOptionorderby),
Expand Down