couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Copenhaver <>
Subject Re: _show functions
Date Fri, 23 Sep 2011 02:54:21 GMT
1) To my knowledge you don't have any control over this... but I want to say there is a discussion
or some work being done to allow for more control over ETag generation. I had originally thought
a _show function's ETag was simply the document's (based on revision hash I think) but the
Wiki shows it's a bit more complex then that:

2) Not entirely sure what you are asking. To retrieve an attachment you just retrieve it off
the document. Something like http://server/db/docid/attachmentid

Are you trying to embed an attachment's data into the _show's results? I don't think that
is possible as you are only given access to the document requested which will only have the
attachment stubs.

Sean Copenhaver

Sent with Sparrow (
On Thursday, September 22, 2011 at 9:29 PM, Gert Cuykens wrote: 
> 1) How do you overwrite the ETag of a show function?
> I tried this but does not work.
> return {headers:{'Content-Type':'text/html','Etags':doc._rev},body:'...'}
> 2) Can you use the show function to show the content of a binary attachment?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message