Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E679BDFFA for ; Wed, 11 Jul 2012 00:18:19 +0000 (UTC) Received: (qmail 93715 invoked by uid 500); 11 Jul 2012 00:18:19 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 93675 invoked by uid 500); 11 Jul 2012 00:18:19 -0000 Mailing-List: contact dev-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 dev@couchdb.apache.org Received: (qmail 93667 invoked by uid 99); 11 Jul 2012 00:18:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2012 00:18:19 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gert.cuykens@gmail.com designates 209.85.214.180 as permitted sender) Received: from [209.85.214.180] (HELO mail-ob0-f180.google.com) (209.85.214.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2012 00:18:11 +0000 Received: by obbuo19 with SMTP id uo19so760950obb.11 for ; Tue, 10 Jul 2012 17:17:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Gyxja2HAqvxMzml8sge5YBfgQbhn2SP6amgED9a7iHY=; b=qrvgOE+JPiMAzw3TLfISZVy9xR7A/SzN91ViG30vHzdFDcSCjHHnqnF73Oza1w/dv5 HVWhTFgYk5++4o2B2t9GqgYHK4p8DUclGwoz8JyRMpf3bALxbx+pktVFHIznZe8iue0y 5VGtWqcnVia6ReeZNIzVuDUti5ESSf8S/04WwqxmNYWQoY38pYmdRUEKaZ6jg0kEhB6W 3UMN8UbXKbGES5pROY4sxMMBaCV+lGdzxvaeS/Jlv4W5Uh5egcFehD67kNfa0rR2cdRx OohG00axhU6gNpUT46aZojEIsaYgW9EoRqx+R2OiDprA0g2prtpDFbFUPQGbur2JZ+Mn 07sA== MIME-Version: 1.0 Received: by 10.60.24.4 with SMTP id q4mr48341245oef.50.1341965870938; Tue, 10 Jul 2012 17:17:50 -0700 (PDT) Received: by 10.76.112.78 with HTTP; Tue, 10 Jul 2012 17:17:50 -0700 (PDT) Date: Wed, 11 Jul 2012 02:17:50 +0200 Message-ID: Subject: couch_query_servers From: Gert Cuykens To: dev@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 trying to solve this https://issues.apache.org/jira/browse/COUCHDB-1478 i started looking at show handle_doc_show(Req, Db, DDoc, ShowName, Doc, DocId) -> % get responder for ddoc/showname CurrentEtag = show_etag(Req, Doc, DDoc, []), couch_httpd:etag_respond(Req, CurrentEtag, fun() -> JsonReq = couch_httpd_external:json_req_obj(Req, Db, DocId), JsonDoc = couch_query_servers:json_doc(Doc), [<<"resp">>, ExternalResp] = couch_query_servers:ddoc_prompt(DDoc, [<<"shows">>, ShowName], [JsonDoc, JsonReq]), JsonResp = apply_etag(ExternalResp, CurrentEtag), couch_httpd_external:send_external_response(Req, JsonResp) end). Ended up in couch_query_servers proc_prompt_raw(#proc{prompt_fun = {Mod, Func}} = Proc, Args) -> apply(Mod, Func, [Proc#proc.pid, Args]). I have no idea where to even start trying to make this work in a show function? return {file:doc.attachment...}