Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3DEE310B21 for ; Tue, 16 Dec 2014 20:57:19 +0000 (UTC) Received: (qmail 84218 invoked by uid 500); 16 Dec 2014 20:57:19 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 84178 invoked by uid 500); 16 Dec 2014 20:57:19 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 84169 invoked by uid 99); 16 Dec 2014 20:57:19 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2014 20:57:19 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B77EAA2D817; Tue, 16 Dec 2014 20:57:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davisp@apache.org To: commits@couchdb.apache.org Date: Tue, 16 Dec 2014 20:57:18 -0000 Message-Id: <7c4c4a8174a242f89f8124456296481f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/3] chttpd commit: updated refs/heads/master to c9d23bd Repository: couchdb-chttpd Updated Branches: refs/heads/master f79302076 -> c9d23bdf4 Return error when open_revs=all and document doesn't exist COUCHDB-2517 Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/016ede4b Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/016ede4b Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/016ede4b Branch: refs/heads/master Commit: 016ede4b458db2e006914f5cd7d157fb42ff0733 Parents: b44515f Author: ILYA Khlopotov Authored: Mon Dec 8 07:45:00 2014 -0800 Committer: ILYA Khlopotov Committed: Mon Dec 15 12:22:09 2014 -0800 ---------------------------------------------------------------------- src/chttpd_db.erl | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/016ede4b/src/chttpd_db.erl ---------------------------------------------------------------------- diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl index 24eb78c..79d832b 100644 --- a/src/chttpd_db.erl +++ b/src/chttpd_db.erl @@ -582,6 +582,10 @@ db_doc_req(#httpd{method='GET'}=Req, Db, DocId) -> undefined -> []; AcceptHeader -> string:tokens(AcceptHeader, ", ") end, + case Results of + [] when Revs == all -> + chttpd:send_error(Req, {not_found, missing}); + _Else -> case lists:member("multipart/mixed", AcceptedTypes) of false -> {ok, Resp} = start_json_response(Req, 200), @@ -608,6 +612,7 @@ db_doc_req(#httpd{method='GET'}=Req, Db, DocId) -> true -> send_docs_multipart(Req, Results, Options) end + end end; db_doc_req(#httpd{method='POST', user_ctx=Ctx}=Req, Db, DocId) ->