Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-2247

Etags should be quoted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 3.1.0
    • 3.0.3
    • SyncGateway
    • Security Level: Public
    • CBG Sprint 104, CBG Sprint 105, CBG Sprint 106
    • 3

    Description

      HTTP 1.1 specifies that Etag values are delimited by double-quotes; this affects headers Etag, If-Match, If-None-Match, etc. Sync Gateway isn't doing this in some cases.

      • The admin API for accessing the config (admin_api.go) both sets and reads unquoted etags.
      • doc_api.go appears to set quoted Etag: headers, but when it reads If-Match: headers it doesn't unquote them. As far as I can tell, this breaks conditional GETs of documents. I don't think that feature is being tested properly
      • api_test.go isn't detecting the above bug – it expects the quotes when it looks at document Etags, but when it generates If-Match headers for requests it doesn't quote them. In other words it isn't acting like a real client and sending back the same Etag it received.

      Attachments

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

        Activity

          People

            gregory.newmansmith Gregory Newman-Smith
            jens Jens Alfke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty