Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
None
-
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.