On Jul 18, 2013, at 9:19 AM, Paul Roebuck wrote:

> [SNIP]
> P.S. As something I just want to know, is there an issue with mixing
> start() with provides() inside a list function? Was surprised at the badarg
> exceptions...
> [SNIP]

Figured it out, but for anyone else, turns out the header values MUST
be character strings. I had (incorrectly) assumed CouchDB would
convert that for me...

list(head, req) {
  start({
      headers: {
//          "X-NRows": head.total_rows
          "X-NRows": "" + head.total_rows    // Convert to string
      }
  });

  provides("json") {
      // generate time consuming output
  }
  provides("xml") {
      // generate time consuming output
  }
}



Reply via email to