couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r829924 - in /couchdb/branches/0.10.x: ./ etc/default/couchdb src/couchdb/couch_httpd_db.erl
Date Mon, 26 Oct 2009 19:55:13 GMT
Author: kocolosk
Date: Mon Oct 26 19:55:12 2009
New Revision: 829924

URL: http://svn.apache.org/viewvc?rev=829924&view=rev
Log:
asking for a missing rev with ?rev or ?open_revs was a 500 response

Modified:
    couchdb/branches/0.10.x/   (props changed)
    couchdb/branches/0.10.x/etc/default/couchdb   (props changed)
    couchdb/branches/0.10.x/src/couchdb/couch_httpd_db.erl

Propchange: couchdb/branches/0.10.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct 26 19:55:12 2009
@@ -4,4 +4,4 @@
 /couchdb/branches/list-iterator:782292-784593
 /couchdb/branches/tail_header:775760-778477
 /couchdb/tags/0.10.0:825400
-/couchdb/trunk:806983,807208-807478,807771,808574,808632,808716,808876,809134,809977,810015,810028,810350,810358,810435,811910,813803,815921,817278,817398,817400,817403,817749,817793,818249,818357,819091,819341,819343,819436,819799,819977,820344,820469,820495,820851,825407,826692,829871
+/couchdb/trunk:806983,807208-807478,807771,808574,808632,808716,808876,809134,809977,810015,810028,810350,810358,810435,811910,813803,815921,817278,817398,817400,817403,817749,817793,818249,818357,819091,819341,819343,819436,819799,819977,820344,820469,820495,820851,825407,826692,829871,829919

Propchange: couchdb/branches/0.10.x/etc/default/couchdb
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct 26 19:55:12 2009
@@ -4,5 +4,5 @@
 /couchdb/branches/list-iterator/etc/default/couchdb:782292-784593
 /couchdb/branches/tail_header/etc/default/couchdb:775760-778477
 /couchdb/tags/0.10.0/etc/default/couchdb:825400
-/couchdb/trunk/etc/default/couchdb:806983,807208-807478,807771,808574,808632,808716,808876,809134,809977,810015,810028,810350,810358,810435,811910,813803,815921,817277-817278,817398,817400,817403,817749,817793,818249,818357,819091,819341,819343,819436,819799,819977,820344,820469,820495,820851,825407,826692,829871
+/couchdb/trunk/etc/default/couchdb:806983,807208-807478,807771,808574,808632,808716,808876,809134,809977,810015,810028,810350,810358,810435,811910,813803,815921,817277-817278,817398,817400,817403,817749,817793,818249,818357,819091,819341,819343,819436,819799,819977,820344,820469,820495,820851,825407,826692,829871,829919
 /incubator/couchdb/trunk/etc/default/couchdb:642419-694440

Modified: couchdb/branches/0.10.x/src/couchdb/couch_httpd_db.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/0.10.x/src/couchdb/couch_httpd_db.erl?rev=829924&r1=829923&r2=829924&view=diff
==============================================================================
--- couchdb/branches/0.10.x/src/couchdb/couch_httpd_db.erl (original)
+++ couchdb/branches/0.10.x/src/couchdb/couch_httpd_db.erl Mon Oct 26 19:55:12 2009
@@ -726,7 +726,8 @@
                         Json = ?JSON_ENCODE({[{ok, JsonDoc}]}),
                         send_chunk(Resp, AccSeparator ++ Json);
                     {{not_found, missing}, RevId} ->
-                        Json = ?JSON_ENCODE({[{"missing", RevId}]}),
+                        RevStr = couch_doc:rev_to_str(RevId),
+                        Json = ?JSON_ENCODE({[{"missing", RevStr}]}),
                         send_chunk(Resp, AccSeparator ++ Json)
                     end,
                     "," % AccSeparator now has a comma
@@ -888,6 +889,8 @@
       case couch_db:open_doc_revs(Db, DocId, [Rev], Options) of
           {ok, [{ok, Doc}]} ->
               Doc;
+          {ok, [{{not_found, missing}, Rev}]} ->
+              throw(not_found);
           {ok, [Else]} ->
               throw(Else)
       end



Mime
View raw message