Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1852

Last-Event-ID header should be honoured in eventsource _changes feed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.4.0
    • HTTP Interface
    • None

    Description

      When using the EventSource _changes feed support, the browser API will automatically reconnect and send the last sequence it received in the Last-Event-ID header.

      The server side needs to use the Last-Event-ID instead of the 'since' query string as a starting point for the changes feed.

      You can see the issue by simply creating a database and adding documents and watching what happens to the eventsource _changes feed.

      To see the feed with curl use:
      curl -i -H 'Last-Event-ID: 2' 'http://localhost:5984/testdb/_changes?feed=eventsource'
      the header should also have priority over the since query string:
      curl -i -H 'Last-Event-ID: 2' 'http://localhost:5984/testdb/_changes?feed=eventsource?since=1'

      Attachments

        1. 0001-add-test-for-COUCHDB-1852.patch
          2 kB
          Damjan Georgievski
        2. 0002-Fix-for-COUCHDB-1852.patch
          3 kB
          Damjan Georgievski

        Activity

          People

            Unassigned Unassigned
            gdamjan Damjan Georgievski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: