incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: [jira] Updated: (COUCHDB-472) handle custom CouchdDB welcome page
Date Mon, 09 Aug 2010 13:58:23 GMT
I would like to include this in trunk. Any objecttion ?

What it does is displaying usual welcome in JSON when Accept header is
application/json and in other cases it display an HTML page.

Tested on firefox 3.6, safari 4/5, chrome & opera

On Mon, Aug 9, 2010 at 2:58 PM, Benoit Chesneau (JIRA) <jira@apache.org> wrote:
>
>     [ https://issues.apache.org/jira/browse/COUCHDB-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
>
> Benoit Chesneau updated COUCHDB-472:
> ------------------------------------
>
>    Assignee: Benoit Chesneau
>
> bump. Any reason we couldnot have in couchdb upstream ?
>
>> handle custom CouchdDB welcome page
>> -----------------------------------
>>
>>                 Key: COUCHDB-472
>>                 URL: https://issues.apache.org/jira/browse/COUCHDB-472
>>             Project: CouchDB
>>          Issue Type: Improvement
>>    Affects Versions: 0.10
>>            Reporter: Benoit Chesneau
>>            Assignee: Benoit Chesneau
>>             Fix For: 0.12
>>
>>         Attachments: couchdb_welcome.patch, couchdb_welcome2.patch, couchdb_welcome3.patch,
screenshot.png
>>
>>
>> This change modify behaviour of Welcome handler by allowing admin to customize the
welcome page. If content is "application/json" it will send current json object, if not, it
will send an html page or redirect to another path.
>> This patch change the confugration string to a tupple {WelcomeMsg, WelcomePage}.
WelcomePage could be a string for DocumentRoot where it will find welcome.html page or a tupple
{redirect, Url}
>> Ex if in config you have:
>> / = {couch_httpd_misc_handlers, handle_welcome_req, {<<"Welcome">>, "/usr/local/share/couchdb/www"}}
>> If Accept content is application/json Couchdb will send :
>> "couchdb":"Welcome","version":"0.10.0a"}
>> If other it will send welcome.html.
>> if you replace "/usr/local/share/couchdb/www" by {redirect, <<"/_utils">>} user
will be redirected on futon.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

Mime
View raw message