CouchDB
  1. CouchDB
  2. COUCHDB-1852

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0
    • Component/s: HTTP Interface
    • Labels:
      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'

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

        Activity

        Damjan Georgievski created issue -
        Damjan Georgievski made changes -
        Field Original Value New Value
        Attachment draft.patch [ 12592210 ]
        Damjan Georgievski made changes -
        Attachment draft.patch [ 12592228 ]
        Attachment draft.patch [ 12592229 ]
        Damjan Georgievski made changes -
        Attachment draft.patch [ 12592229 ]
        Damjan Georgievski made changes -
        Attachment draft.patch [ 12592228 ]
        Damjan Georgievski made changes -
        Attachment parse_changes_query_checks_last-event-id_header.patch [ 12592295 ]
        Damjan Georgievski made changes -
        Attachment 0001-make-test-for-COUCHDB-1852.patch [ 12592305 ]
        Attachment 0002-Fix-for-COUCHDB-1852.patch [ 12592306 ]
        Damjan Georgievski made changes -
        Attachment draft.patch [ 12592210 ]
        Damjan Georgievski made changes -
        Attachment parse_changes_query_checks_last-event-id_header.patch [ 12592295 ]
        Damjan Georgievski made changes -
        Attachment 0001-add-test-for-COUCHDB-1852.patch [ 12592330 ]
        Damjan Georgievski made changes -
        Attachment 0001-make-test-for-COUCHDB-1852.patch [ 12592305 ]
        Robert Newson made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.4 [ 12323451 ]
        Resolution Fixed [ 1 ]
        Damjan Georgievski made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Damjan Georgievski
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development