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/23 15:45:04 UTC

[GitHub] [couchdb] bessbd commented on a change in pull request #2270: Make changes feed return bad request for invalid heartbeat values

bessbd commented on a change in pull request #2270: Make changes feed return bad request for invalid heartbeat values
URL: https://github.com/apache/couchdb/pull/2270#discussion_r338129427
 
 

 ##########
 File path: src/chttpd/src/chttpd_db.erl
 ##########
 @@ -1816,7 +1816,14 @@ parse_changes_query(Req) ->
         {"heartbeat", "true"} ->
             Args#changes_args{heartbeat=true};
         {"heartbeat", _} ->
-            Args#changes_args{heartbeat=list_to_integer(Value)};
+            try list_to_integer(Value) of
+                V when V > 0 ->
+                    Args#changes_args{heartbeat=heartbeat_integer};
 
 Review comment:
   Good call! I've just pushed a commit to fix this.

----------------------------------------------------------------
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