You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Chris Anderson (JIRA)" <ji...@apache.org> on 2009/05/11 20:49:45 UTC

[jira] Created: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

/ 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
             Fix For: 0.10


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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747057#action_12747057 ] 

Chris Anderson commented on COUCHDB-348:
----------------------------------------

The check would be relatively straightforward, web-sane, and friendly to API clients. No browser-sniffing required.

If the client sends an HTTP Accept header that prefers HTML to JSON (as browsers do), then we'd send HTML, otherwise we'd send JSON.

> / 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
>             Fix For: 0.10
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791698#action_12791698 ] 

Benoit Chesneau commented on COUCHDB-348:
-----------------------------------------

i posted a patch that display a "human" page and still send the message on accept header :

https://issues.apache.org/jira/browse/COUCHDB-472

> / 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
>             Fix For: 0.11
>
>         Attachments: COUCHDB_348_01.patch, COUCHDB_348_02.patch
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791743#action_12791743 ] 

Paul Joseph Davis commented on COUCHDB-348:
-------------------------------------------

@matthew That mimeparse library is busted. media type parameters can be quoted which breaks the call to string:tokens("="). Though, that's not too crazy. Even WebOb is broken. Just saying is all. :) As to including it, you might double check if mochiweb already has something. If not, then as long as the license is kosher we'll put it in somewhere.

@nslater Perhaps if someone had suggested redirecting to Futon based on Accept header you'd be in the right ballpark. As it so happens, we're discussing returning an alternate representation of the root resource with something that is human readable based on the accept headers. For instance, the general idea is to replace:

{"couchdb":"Welcome","version":"0.11.0b890185"}

with something like this: 

https://issues.apache.org/jira/secure/attachment/12416873/screenshot.png

I could see adding a couple user friendly links to couchdb.apache.org, wiki.apache.org/couchdb and Futon. But the resource is still they same old "Hey buddy, glad you could make it, lemme get you a nice frosty cold glass of lemonade while you relax right here on this comfy couch."

Cheerio!

> / 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
>             Fix For: 0.11
>
>         Attachments: COUCHDB_348_01.patch, COUCHDB_348_02.patch
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Matt Goodall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791859#action_12791859 ] 

Matt Goodall commented on COUCHDB-348:
--------------------------------------

A good example of IE's accept header is:

    Accept: image/jpeg, application/x-ms-application, image/gif,
            application/xaml+xml, image/pjpeg, application/x-ms-xbap,
            application/x-shockwave-flash, application/msword, */*

I took that from http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers but there are plenty of other examples if you search for "internet explorer accept header".

@paul, yes the server can decide what to return when */* is the best match. Some servers implement a server-side quality, e.g. q=0.9, to decide what representation to return.

And, even though I brought this up, I'm actually with Noah on "If it doesn't work for all clients, it doesn't work."

> / 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
>             Fix For: 0.11
>
>         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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Noah Slater (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791755#action_12791755 ] 

Noah Slater commented on COUCHDB-348:
-------------------------------------

Also, you missed the slippers.

> / 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
>             Fix For: 0.11
>
>         Attachments: COUCHDB_348_01.patch, COUCHDB_348_02.patch
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Noah Slater (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791727#action_12791727 ] 

Noah Slater commented on COUCHDB-348:
-------------------------------------

This would be an abuse of HTTP semantics. Representations (i.e. the different media types) are meant to represent the same conceptual resource. Switching in Futon based on the Accept header would be a gross abuse of content negotiation, as Futon is not the HTML representation of any resource which also has the root CouchDB JSON response as another representation. The only two options we have for this ticket is to close it as WONTFIX, or to replace the root resource with Futon - that is, to make Futon live at the root of CouchDB.

> / 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
>             Fix For: 0.11
>
>         Attachments: COUCHDB_348_01.patch, COUCHDB_348_02.patch
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791747#action_12791747 ] 

Paul Joseph Davis commented on COUCHDB-348:
-------------------------------------------

@matt - So I'm unsuprised to learn that IE screws the pooch as per usual. But technically if they end up preferring */* then if memory serves the server can choose. And I don't know why that choice couldn't be based on what exists in the User-Agent string if it exists.

> / 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
>             Fix For: 0.11
>
>         Attachments: COUCHDB_348_01.patch, COUCHDB_348_02.patch
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Noah Slater (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791754#action_12791754 ] 

Noah Slater commented on COUCHDB-348:
-------------------------------------

I would be happy with that screenshot being implemented.

A link to Futon in both JSON and HTML would be good too.

As for conneg, just sniff for anything with HTML.

If it doesn't work for all clients, it doesn't work.

> / 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
>             Fix For: 0.11
>
>         Attachments: COUCHDB_348_01.patch, COUCHDB_348_02.patch
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Matthew Hooker (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791848#action_12791848 ] 

Matthew Hooker commented on COUCHDB-348:
----------------------------------------

@benoitc Matt mentions that it might not work with IE, but I haven't checked. As Dirkjan points out, though, it should probably properly parse the Accept header.

> / 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
>             Fix For: 0.11
>
>         Attachments: COUCHDB_348_01.patch, COUCHDB_348_02.patch, COUCHDB_348_03.patch
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Dirkjan Ochtman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791296#action_12791296 ] 

Dirkjan Ochtman commented on COUCHDB-348:
-----------------------------------------

It should probably parse the qvalues and try to only redirect if text/html (or maybe application/xhtml+xml?) gets higher priority than application/json.

> / 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
>             Fix For: 0.11
>
>         Attachments: COUCHDB_348_01.patch
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filipe Manana updated COUCHDB-348:
----------------------------------

    Attachment: encs.erl

Matthew, regarding the of parsing Q values, I did it for a patch to 583. It was done for parsing the "Accept-Encoding" header, but it should be reusable for other Q values lists. I didn't find it in Mochiweb also :( I agree with yout, it's boring to do such a parsing function.

I add it here in a separate file with test functions. The main function is build_enc_lists/1, which builds 2 lists, one for Q values > 0, and the other with Q values == 0. It ignores white spaces all over and it's case insensitive (as rfc 2626 says):

test_build_lists() ->
    {[], []} = build_enc_lists(""),
    {[], [identity]} = build_enc_lists("identity;q=0"),
    {[], [identity]} = build_enc_lists("identity ;q=0"),
    {[], [identity]} = build_enc_lists(" identity; q =0 "),
    {[], [identity]} = build_enc_lists("identity ; q = 0"),
    {[], [identity]} = build_enc_lists("identity ; q= 0.0"),
    {[gzip, deflate], [identity]} = build_enc_lists("gzip,deflate,identity;q=0.0"),
    {[deflate, gzip], [identity]} = build_enc_lists("deflate,gzip,identity;q=0.0"),
    {[gzip, deflate, gzip], [identity]} = build_enc_lists("gzip,deflate,gzip,identity;q=0"),
    {[gzip, deflate], [identity]} = build_enc_lists("gzip, deflate , identity; q=0.0"),
    {[gzip, deflate], [identity]} = build_enc_lists("gzip; q=1, deflate;q=1.0, identity;q=0.0"),
    {[deflate, gzip], [identity]} = build_enc_lists("gzip; q=0.5, deflate;q=1.0, identity;q=0"),
    {[deflate, gzip], [identity]} = build_enc_lists("gzip; q=0.5, deflate , identity;q=0.0"),
    {[deflate, gzip], [identity]} = build_enc_lists("gzip; q=0.5, deflate;q=0.8, identity;q=0.0"),
    {[deflate, identity, gzip], []} = build_enc_lists("gzip; q=0.5,deflate,identity"),
    {[deflate, identity, identity, gzip], []} = build_enc_lists("gzip; q=0.5,deflate,identity, identity "),
    ok.

cheers

> / 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
>             Fix For: 0.11
>
>         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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Matt Goodall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791709#action_12791709 ] 

Matt Goodall commented on COUCHDB-348:
--------------------------------------

I don't disagree with this at all - an HTML version of the couchdb root resource would make sense. However, some browsers (yes, Internet Explorer) don't always send text/html in the Accept header. So, sadly, it's not actually true that all browser prefer HTML to JSON. IE sends an insane Accept header and the best match ends up being "*/*" which means it may be up to the server to prioritise text/html over application/json.

> / 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
>             Fix For: 0.11
>
>         Attachments: COUCHDB_348_01.patch, COUCHDB_348_02.patch
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Matthew Hooker (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew Hooker updated COUCHDB-348:
-----------------------------------

    Attachment: COUCHDB_348_02.patch

properly parsing qvalues is actually kind of tricky. I probably would have messed up the implementation, but luckily there's a great library that does just that, hosted over at http://code.google.com/p/mimeparse/

Attached also is the patch that uses that to correctly resolve this issue.

The question now it, can I include that library in couch? If so, how? I can see it being quite useful for other things (e.g. COUCHDB-234).

Thanks,

> / 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
>             Fix For: 0.11
>
>         Attachments: COUCHDB_348_01.patch, COUCHDB_348_02.patch
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Matthew Hooker (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew Hooker updated COUCHDB-348:
-----------------------------------

    Attachment: COUCHDB_348_03.patch

>From the comments, it seems like a mix of the Accept detection and the human readable "Welcome" page in COUCHDB-472 is preferred. Attached is a patch which does just that.

@paul I didn't see anything in Mochiweb that might deal with Accept headers or mime types. The code is under the MIT license.

> / 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
>             Fix For: 0.11
>
>         Attachments: COUCHDB_348_01.patch, COUCHDB_348_02.patch, COUCHDB_348_03.patch
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis updated COUCHDB-348:
--------------------------------------

    Skill Level: New Contributors Level (Easy)

> / 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
>             Fix For: 0.12
>
>         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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Matthew Hooker (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew Hooker updated COUCHDB-348:
-----------------------------------

    Attachment: COUCHDB_348_01.patch

I think this patch does what Chris described. I've tested it in firefox and curl, and I get the expected results.

Not being super expert at either the CouchDB codebase or Erlang, I think this is sort of a naive approach, and would appreciate some feedback.

It merely checks if the client is sending 'text/html' as part of the Accept header, and like COUCHDB-234, it doesn't respect qvalues, so if the client can do both html and json, it will get html.

Thanks.

> / 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
>             Fix For: 0.11
>
>         Attachments: COUCHDB_348_01.patch
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Simon Thulbourn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747048#action_12747048 ] 

Simon Thulbourn commented on COUCHDB-348:
-----------------------------------------

I disagree, this should remain as it is. It allows for people writing API classes to perform a check to see if it's successful. Besides, how does it know what a browser is without parts of the user agent string to be checked every time something visits the page?

> / 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
>             Fix For: 0.10
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791846#action_12791846 ] 

Benoit Chesneau commented on COUCHDB-348:
-----------------------------------------

@ matthew I don't see why it shouldn't works with Interet Explorer here (speaking of my patch). Does ie rewrite the Accept header ? 

> / 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
>             Fix For: 0.11
>
>         Attachments: COUCHDB_348_01.patch, COUCHDB_348_02.patch, COUCHDB_348_03.patch
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

Posted by "Noah Slater (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Noah Slater updated COUCHDB-348:
--------------------------------

    Fix Version/s:     (was: 0.11)
                   0.12

> / 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
>             Fix For: 0.12
>
>         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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.