You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/08/07 17:37:59 UTC

[37/50] couch commit: updated refs/heads/windsor-merge to 6e60cbe

Fix JSON encoding for missing revisions

This is a super old bug from when we switched to Jiffy. Jiffy doesn't
support Erlang strings as object keys due to Unicode issues. This just
changes the "missing" string to a <<"missing">> binary.

BugzId: 26050


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/ff82e5f5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/ff82e5f5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/ff82e5f5

Branch: refs/heads/windsor-merge
Commit: ff82e5f55bf6b832196597cd595f86beebcfa042
Parents: aa35d4f
Author: Paul J. Davis <pa...@gmail.com>
Authored: Wed Dec 11 11:09:37 2013 -0600
Committer: Robert Newson <rn...@apache.org>
Committed: Wed Aug 6 12:49:04 2014 +0100

----------------------------------------------------------------------
 src/couch_httpd_db.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/ff82e5f5/src/couch_httpd_db.erl
----------------------------------------------------------------------
diff --git a/src/couch_httpd_db.erl b/src/couch_httpd_db.erl
index 7360dc0..8689944 100644
--- a/src/couch_httpd_db.erl
+++ b/src/couch_httpd_db.erl
@@ -520,7 +520,7 @@ db_doc_req(#httpd{method = 'GET', mochi_req = MochiReq} = Req, Db, DocId) ->
                         send_chunk(Resp, AccSeparator ++ Json);
                     {{not_found, missing}, RevId} ->
                         RevStr = couch_doc:rev_to_str(RevId),
-                        Json = ?JSON_ENCODE({[{"missing", RevStr}]}),
+                        Json = ?JSON_ENCODE({[{<<"missing">>, RevStr}]}),
                         send_chunk(Resp, AccSeparator ++ Json)
                     end,
                     "," % AccSeparator now has a comma
@@ -663,7 +663,7 @@ send_docs_multipart(Req, Results, Options1) ->
              couch_httpd:send_chunk(Resp, <<"\r\n--", OuterBoundary/binary>>);
         ({{not_found, missing}, RevId}) ->
              RevStr = couch_doc:rev_to_str(RevId),
-             Json = ?JSON_ENCODE({[{"missing", RevStr}]}),
+             Json = ?JSON_ENCODE({[{<<"missing">>, RevStr}]}),
              couch_httpd:send_chunk(Resp,
                 [<<"\r\nContent-Type: application/json; error=\"true\"\r\n\r\n">>,
                 Json,