couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Lehnardt (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-348) / should redirect to a human readable page when accessed from a browser
Date Wed, 11 Dec 2013 18:04:08 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13845589#comment-13845589
] 

Jan Lehnardt commented on COUCHDB-348:
--------------------------------------

The way we’d do this is only show HTML if we can be reasonably certain we see a browser.
That could be based on a number of headers we know only browsers send in that combination.
If we can’t be sure, we send JSON, as usual. In addition we could store a cookie in the
browser to mark this.

Alternatively, we could send a link to /_utils in the welcome JSON:

{"couchdb":"Welcome","uuid":"0189308e0394cfdcf495074d7dec7cd7","version":"1.5.0","vendor":{"version":"1.5.0","name":"The
Apache Software Foundation", "admin":"http://127.0..0.1:5984/_utils/"}}

(inside vendor because e.g. Cloudant might have a different URL)

> / should redirect to a human readable page when accessed from a browser
> -----------------------------------------------------------------------
>
>                 Key: COUCHDB-348
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-348
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: HTTP Interface
>            Reporter: Chris Anderson
>            Assignee: Robert Newson
>         Attachments: COUCHDB_348_01.patch, COUCHDB_348_02.patch, COUCHDB_348_03.patch,
encs.erl
>
>
> As more people are adopting CouchDB, the number of questions along the lines of "All
I see is {"couchdb":"Welcome","version":"0.10.0a773399"}, what now?"
> If this page redirected to /_utils/ (or maybe something more user-focussed) when the
accept headers included html, we could make the first-time user experience more palatable.
> There's some code in COUCHDB-234 that might be helpful here.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message