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

CouchDB 2.X: _changes?feed=longpoll returns an invalid response

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 2.0.0
    • HTTP Interface
    • None

    Description

      _changes?feed=longpoll seems to be broken in CouchDB master.

      In CouchDB 1.6.1:

      $ curl http://127.0.0.1:5984/testlongpoll -XPUT
      {"ok":true}
      
      $ curl 'http://127.0.0.1:5984/testlongpoll/_changes?feed=longpoll' 
       {"results":[
      ],
      "last_seq":0}
      

      For the last request, the connection is held open (as expected) before the final part of the response is returned.

      In CouchDB 2.X/master:

      $ curl 'http://127.0.0.1:15984/testlongpoll' -XPUT 
      {"ok":true}
      
      $curl 'http://127.0.0.1:15984/testlongpoll/_changes?feed=longpoll'
      {"results":[
      

      CouchDB 2.X closes the connection immediately, resulting in invalid JSON.

      The PouchDB test suite detected this around 13 days ago, coinciding with https://github.com/apache/couchdb-chttpd/commit/3866725ee99c6d89aff91ecb70a3b3cbbabaed8c, so I'd guess this is the first place to investigate.

      Attachments

        Activity

          People

            rnewson Robert Newson
            wilhol Will Holley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment