Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-942

How should headers applied to a batch affect statements within a batch?

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_ERRATA03
    • Fix Version/s: V4.01_WD01
    • Component/s: Protocol
    • Labels:
      None
    • Proposal:
      Hide

      The following is a proposal for the use of headers in batch requests and responses.

      Common Headers
      ===============
      Content-Type - Each request in the batch must have a content type header as per section 11.7
      Content-Encoding - Value on requests in batch overrides the batch value
      Content-Language - Value on requests in batch overrides the batch value
      Content-Length - Value on requests in batch specify the length of that request
      OData-Version - Value on requests in batch overrides the batch value. Typically wouldn't vary from request to request.

      Request Headers
      ===============
      Accept - Value on requests in batch overrides the batch value

      Accept-Charset - Value on requests in batch overrides the batch value

      Accept-Language - Value on requests in batch overrides the batch value

      If-Match - MUST NOT specify on the overall batch

      If-None-Match - MUST NOT specify on the overall batch.

      OData-Isolation - Applies to the overal batch only. Ignored on requests in the batch (per section 8.2.6)

      OData-MaxVersion - Value on requests in batch overrides the batch value.

      Prefer:odata.allow-entityreferences - Value on requests in batch overrides the batch value

      Prefer:odata.callback - Async on batch level; track-changes at request level.

      Prefer:odata.continue-on-error - MUST NOT be specified on requests in the batch

      Prefer:odata.include-annotations - Value on requests in batch overrides the batch value

      Prefer:odata.maxpagesize - SHOULD NOT be specified on batch

      Prefer:odata.track-changes - SHOULD NOT be specified on batch

      Prefer:return - SHOULD NOT be specified on batch

      Prefer:respond-async - SHOULD NOT be specified (and is ignored) on requests in the batch (per section 8.2.8.8)

      Prefer:wait - On batch, applies to overall batch. On statement applies to individual statement. This is the only header that should be used on a changeset.

      Schema-Version (OData 4.01) - Value on requests in batch overrides the batch value

      Response Headers
      =================
      ETag - Can be applied to responses in a batch response. SHOULD NOT be returned for batch.

      Location - Can be applied to responses in a batch response. SHOLD NOT be returned for batch.

      OData-EntityId - Can be applied to responses in a batch response. SHOULD NOT be returned for batch.

      Preference-Applied - Can be applied to responses in a batch response and also the overal batch

      Retry-After - Applies to the overal batch response only.

      Show
      The following is a proposal for the use of headers in batch requests and responses. Common Headers =============== Content-Type - Each request in the batch must have a content type header as per section 11.7 Content-Encoding - Value on requests in batch overrides the batch value Content-Language - Value on requests in batch overrides the batch value Content-Length - Value on requests in batch specify the length of that request OData-Version - Value on requests in batch overrides the batch value. Typically wouldn't vary from request to request. Request Headers =============== Accept - Value on requests in batch overrides the batch value Accept-Charset - Value on requests in batch overrides the batch value Accept-Language - Value on requests in batch overrides the batch value If-Match - MUST NOT specify on the overall batch If-None-Match - MUST NOT specify on the overall batch. OData-Isolation - Applies to the overal batch only. Ignored on requests in the batch (per section 8.2.6) OData-MaxVersion - Value on requests in batch overrides the batch value. Prefer:odata.allow-entityreferences - Value on requests in batch overrides the batch value Prefer:odata.callback - Async on batch level; track-changes at request level. Prefer:odata.continue-on-error - MUST NOT be specified on requests in the batch Prefer:odata.include-annotations - Value on requests in batch overrides the batch value Prefer:odata.maxpagesize - SHOULD NOT be specified on batch Prefer:odata.track-changes - SHOULD NOT be specified on batch Prefer:return - SHOULD NOT be specified on batch Prefer:respond-async - SHOULD NOT be specified (and is ignored) on requests in the batch (per section 8.2.8.8) Prefer:wait - On batch, applies to overall batch. On statement applies to individual statement. This is the only header that should be used on a changeset. Schema-Version (OData 4.01) - Value on requests in batch overrides the batch value Response Headers ================= ETag - Can be applied to responses in a batch response. SHOULD NOT be returned for batch. Location - Can be applied to responses in a batch response. SHOLD NOT be returned for batch. OData-EntityId - Can be applied to responses in a batch response. SHOULD NOT be returned for batch. Preference-Applied - Can be applied to responses in a batch response and also the overal batch Retry-After - Applies to the overal batch response only.
    • Resolution:
      Show
      https://www.oasis-open.org/apps/org/workgroup/odata/download.php/59028/odata-v4.01-wd01-part1-protocol.docx

      Description

      Today we don't spell out how setting a header on a batch affects individual statements of the batch, nor do we specify what happens if the same header is specified on the batch and the individual statement with different values.

      Do we ignore headers on the batch? Do we define a precedence rule where headers on the batch define defaults, but headers on the individual statements take precedence. For something like include-annotations, does a precedence rule imply that, if an annotation is included in the batch and not specified in the individual request, it is included, if an annotation is excluded in the batch and not specified in the individual request it is excluded, if an annotation is included in the batch and excluded in the individual request it is excluded, and if an annotation is excluded in the batch but included in the request it is included?

        Attachments

          Activity

            People

            • Assignee:
              mark.biamonte Mark Biamonte (Inactive)
              Reporter:
              mikep Michael Pizzo
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: