You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Hank Knight <hk...@gmail.com> on 2014/01/08 22:47:58 UTC

CouchDB: Content Type Header for Show Function

Here is my show function:
https://zuhqtr5.couchappy.com/test/show/show.txt

Here is what it does:
https://zuhqtr5.couchappy.com/test/_design/showtimestamp/_show/serverTime

How can I add a custom content header to this show function so
Content-Type: application/javascript
is sent with the headers?

Re: CouchDB: Content Type Header for Show Function

Posted by Hank Knight <hk...@gmail.com>.
Thanks.

'headers': {'Content-Type' : 'application/javascript','Etag' :
'','Expires' : '0', 'Pragma': 'no-cache'}

This adds the Content-Type header and the Expires header and the
Pragma header however it does not change or remove the Etag header.

I am using this to get the current timestamp from the server and I
don't want it to be cached by Squid.  Is there any way to remove the
Etag header?


On Wed, Jan 8, 2014 at 5:52 PM, Alexander Shorin <kx...@gmail.com> wrote:
> http://docs.couchdb.org/en/latest/couchapp/ddocs.html#show-functions
>
> --
> ,,,^..^,,,
>
>
> On Thu, Jan 9, 2014 at 1:47 AM, Hank Knight <hk...@gmail.com> wrote:
>> Here is my show function:
>> https://zuhqtr5.couchappy.com/test/show/show.txt
>>
>> Here is what it does:
>> https://zuhqtr5.couchappy.com/test/_design/showtimestamp/_show/serverTime
>>
>> How can I add a custom content header to this show function so
>> Content-Type: application/javascript
>> is sent with the headers?

Re: CouchDB: Content Type Header for Show Function

Posted by Alexander Shorin <kx...@gmail.com>.
http://docs.couchdb.org/en/latest/couchapp/ddocs.html#show-functions

--
,,,^..^,,,


On Thu, Jan 9, 2014 at 1:47 AM, Hank Knight <hk...@gmail.com> wrote:
> Here is my show function:
> https://zuhqtr5.couchappy.com/test/show/show.txt
>
> Here is what it does:
> https://zuhqtr5.couchappy.com/test/_design/showtimestamp/_show/serverTime
>
> How can I add a custom content header to this show function so
> Content-Type: application/javascript
> is sent with the headers?

Re: CouchDB: Content Type Header for Show Function

Posted by Stanley Iriele <si...@gmail.com>.
Wait...exactly are you trying g to accomplish with the current server time?
Here is my show function:
https://zuhqtr5.couchappy.com/test/show/show.txt

Here is what it does:
https://zuhqtr5.couchappy.com/test/_design/showtimestamp/_show/serverTime

How can I add a custom content header to this show function so
Content-Type: application/javascript
is sent with the headers?