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

Header Content-Type shouldn't be required for media types

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_ERRATA02
    • Fix Version/s: V4.0_ERRATA03
    • Component/s: Protocol
    • Labels:
      None
    • Environment:

      Applied

    • Proposal:
      Hide

      While we can be more restrictive in OData by requiring the Content-Type header in responses, we want to allow for cases where the upload client doesn't specify a content-type.

      Therefore, we should change Content-type from MUST to SHOULD for media types only. This allows a service to return content received with no content type as either application/octet-stream or without a content type.

      Show
      While we can be more restrictive in OData by requiring the Content-Type header in responses, we want to allow for cases where the upload client doesn't specify a content-type. Therefore, we should change Content-type from MUST to SHOULD for media types only. This allows a service to return content received with no content type as either application/octet-stream or without a content type.
    • Resolution:
      Show
      Applied to 8.1.1 Header Content-Type https://www.oasis-open.org/committees/download.php/57689/odata-v4.0-wd08-part1-protocol-2016-03-03.docx

      Description

      This section misquotes RFC7231 and states that a Content-Type header MUST be present.

      https://tools.ietf.org/html/rfc7231#section-3.1.1.5 only says SHOULD

      Note that browsers may not specify a content type in some cases. This means that a client can upload a media type without specifying a content-type, the service can store it, and then return the media in a response but may not know what the content-type is (server could return application/octet-stream).

        Attachments

          Activity

            People

            • Assignee:
              mikep Michael Pizzo (Inactive)
              Reporter:
              handl Ralf Handl
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: