3.2.5.1 Common Rules for Receiving All Data Service Requests

This section outlines a set of directives that a server MUST follow when processing requests. In addition, further directives specific to each request type are defined in the following sections.

If a request includes a DataServiceVersion (section 2.2.5.3) header, the server MUST validate that the header value is correctly formatted according to the rules in DataServiceVersion (section 2.2.5.3) and that the version number provided in the header is less than or equal to the maximum version of this document the data service implements. If so, then the server MUST interpret the request as defined by the protocol version specified in the header. If the version number in the DataServiceVersion (section 2.2.5.3) header of the request is larger than the maximum version number the server implements or is malformed, the server MUST return a 4xx error response code. If a request does not specify a DataServiceVersion (section 2.2.5.3) header, the server MUST interpret the request as defined by the highest protocol version number the server understands.

If the request includes a MaxDataServiceVersion (section 2.2.5.7) header, the server MUST parse and validate the header value to ensure it adheres to the syntax specified in MaxDataServiceVersion (section 2.2.5.7). If the header value is malformed, the server MUST return a 4xx error response code. If a valid version number is provided, the server MUST use the version number as specified in Versioning and Capability Negotiation (section 1.7), which outlines this document's versioning scheme. If no MaxDataServiceVersion (section 2.2.5.7) header is present, the server SHOULD assume the client understands all the protocol versions that the server implements.

If the request includes an If-Match (section 2.2.5.5) or an If-None-Match (section 2.2.5.6) header but the EntityType associated with the resource identified by the request URI, referred to as the "target EntityType", does not define a concurrency token, then the server MUST return a 4xx error response. The one exception to this rule is that if an If-Match header with a value of "*" is present on the request, then a data service MAY accept the request.

If the request includes an If-Match (section 2.2.5.5) header, it MUST be parsed and processed according to If-Match (section 2.2.5.5). If the value of the header is "*" and the target EntityType defines a concurrency token, the request is processed as if the concurrency check succeeded.

Servers MAY<69> choose to implement access control policies where certain requests are rejected based on the requesting identity, the target resource, and potentially other environmental information.