diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-01-27 20:46:39 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-01-27 20:46:39 +0000 |
commit | ee4ba41be000abbf4d888d306c72b6e805fdc01b (patch) | |
tree | dc94fe1feff640ddbc39ead878ba75420a55917c /src/couchdb/couch_query_servers.erl | |
parent | 482d19963237d4640e08bbb25585f2016328a004 (diff) |
Improved etag handling for show funcs and db_doc requests; main.js cleanup (baby steps); null doc allowed for show funcs
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@738237 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_query_servers.erl')
-rw-r--r-- | src/couchdb/couch_query_servers.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/couchdb/couch_query_servers.erl b/src/couchdb/couch_query_servers.erl index a6bb6e06..5eca63c2 100644 --- a/src/couchdb/couch_query_servers.erl +++ b/src/couchdb/couch_query_servers.erl @@ -125,7 +125,10 @@ validate_doc_update(Lang, FunSrc, EditDoc, DiskDoc, Ctx) -> render_doc_show(Lang, ShowSrc, Doc, Req, Db) -> Pid = get_os_process(Lang), - JsonDoc = couch_doc:to_json_obj(Doc, [revs]), + JsonDoc = case Doc of + nil -> null; + _ -> couch_doc:to_json_obj(Doc, [revs]) + end, JsonReq = couch_httpd_external:json_req_obj(Req, Db), try couch_os_process:prompt(Pid, [<<"show_doc">>, ShowSrc, JsonDoc, JsonReq]) of |