Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-57725

[TC] We should not require Content-Length header in GetObject

    XMLWordPrintable

Details

    • 0

    Description

      What is the problem?
      In all the objcli we currently set ObjectAttrs.Size based on the response's Content-Length header. Although all the blob stores do send this header correctly we have seen a few cases where third party S3 compatible blob stores miss out the header. As an example, they may decide to transfer using chunk encoding where the header should not be supplied.

      In the HTTP/1.1 spec there are two relevant sections:

      It's arguable whether we should consider S3's observed behaviour as the contract for object stores or whether we should consider being a good HTTP citizen more important. Given a few customers have hit this problem it doesn't seem unreasonable to be more accepting of responses here.

      What is the solution?
      We should check whether or not we use ObjectAttrs.Size from GetObject - from a brief search we do not though. We probably then want to change GetObject's API to not return a full ObjectAttrs. Ideally we would make the field optional or return a different struct.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Matt.Hall Matt Hall
              Matt.Hall Matt Hall
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty