This is an automated email from the ASF dual-hosted git repository. jan pushed a commit to branch 1.x.x in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit f4993f3ffa91d6d4b8ab040f65feb2b5371e39e8 Author: Robert Newson <[email protected]> AuthorDate: Thu Oct 8 13:12:09 2015 +0100 Throw if parse_revs is not a list COUCHDB-2845 --- share/doc/src/whatsnew/1.7.rst | 1 + src/couchdb/couch_doc.erl | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/share/doc/src/whatsnew/1.7.rst b/share/doc/src/whatsnew/1.7.rst index b14b1f6..ff77a9e 100644 --- a/share/doc/src/whatsnew/1.7.rst +++ b/share/doc/src/whatsnew/1.7.rst @@ -30,6 +30,7 @@ API Changes - :issue:`1356`: Return username on :http:post:`/_session`. - :issue:`1876`: Fix duplicated Content-Type for show/update functions. +- :issue:`2845`: :statuscode:`400` returned when `revs` is not a list. Build ----- diff --git a/src/couchdb/couch_doc.erl b/src/couchdb/couch_doc.erl index 4047370..d4386a1 100644 --- a/src/couchdb/couch_doc.erl +++ b/src/couchdb/couch_doc.erl @@ -185,7 +185,9 @@ parse_rev(_BadRev) -> parse_revs([]) -> []; parse_revs([Rev | Rest]) -> - [parse_rev(Rev) | parse_revs(Rest)]. + [parse_rev(Rev) | parse_revs(Rest)]; +parse_revs(_) -> + throw({bad_request, "Invalid list of revisions"}). validate_docid(<<"">>) -> -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
