Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-735 Support HTTP POST for the change notification filter API
  3. COUCHDB-1123

Longpolling changes feed with filter and accidental Content-Length header stalls

    XMLWordPrintableJSON

Details

    Description

      CouchDB behaves erroneously when doing a GET request with Content-Length header to long polling changes feed with filter set.

      Easiest way to reproduce:
      1. Create a new DB
      2. Create a single design doc with a filter that just returns true
      3. Query database with curl: curl -v -H "Content-Length: 123" http://localhost:5984/database/_changes?feed=longpoll&filter=designdoc/filter

      At this point CouchDB behaves strangely. It does not wait for the client to feed the Content-Length bytes of content (which I think is correct, since GET should not have payload), instead, it returns 200 OK and starts the response with '{"results":['. However, no changes done to database ever get emitted and the connection never gets closed, not even if explicit timeout is set upon the request.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nailor Jyrki Pulliainen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: