You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/10/04 12:31:52 UTC

[GitHub] [couchdb] bessbd opened a new issue #2234: /db/_changes feed continuous mode does not return bad request for negative heartbeat values

bessbd opened a new issue #2234: /db/_changes feed continuous mode does not return bad request for negative heartbeat values
URL: https://github.com/apache/couchdb/issues/2234
 
 
   [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ )
   
   ## Description
   
   [NOTE]: # ( Describe the problem you're encountering. )
   [TIP]:  # ( Do NOT give us access or passwords to your actual CouchDB! )
   
   Using a negative heartbeat value does not return a 400 bad request, instead getting just an empty response with no status code at all.
   
   ## Steps to Reproduce
   
   [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. )
   
   ```
   $ curl -XPUT http://localhost:5984/foodb
   {"ok":true}
   $ curl -v 'http://localhost:5984/foodb/_changes?feed=continuous&heartbeat=-1000'
   *   Trying ::1...
   * TCP_NODELAY set
   * Connected to localhost (::1) port 5984 (#0)
   > GET /foodb/_changes?feed=continuous&heartbeat=-1000 HTTP/1.1
   > Host: localhost:5984
   > User-Agent: curl/7.54.0
   > Accept: */*
   >
   * Empty reply from server
   * Connection #0 to host localhost left intact
   curl: (52) Empty reply from server
   ```
   
   ## Expected Behaviour
   
   [NOTE]: # ( Tell us what you expected to happen. )
   
   According to https://docs.couchdb.org/en/2.3.1/api/database/changes.html#get--db-_changes `heartbeat` should be a `Period in milliseconds` or `true to use default value` thus any negative value should result in a `400 Bad Request` response.
   
   ## Your Environment
   
   [TIP]:  # ( Include as many relevant details about your environment as possible. )
   [TIP]:  # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. )
   
   ```
   $ curl http://localhost:5984/
   {"couchdb":"Welcome","version":"2.3.1","git_sha":"c298091a4","uuid":"367155b102e015037fa9f1e1f18bf655","features":["pluggable-storage-engines","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
   ```
   
   ## Additional context
   
   [TIP]:  # ( Add any other context about the problem here. )
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services