[jira] [Commented] (COUCHDB-472) handle custom CouchdDB welcome page

2011-04-25 Thread Benoit Chesneau (JIRA)

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

Benoit Chesneau commented on COUCHDB-472:
-

Some browser clients are bugged and sedn *.*, so not sure if we should detect 
text/html to send html page or not. Nothing against though.

> 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: 1.2
>
> Attachments: COUCHDB-472-2.patch, COUCHDB-472.patch, Welcome page 
> screenshot.jpg, 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (COUCHDB-1103) Make vhost definitions not order-dependent, remove variable matching

2011-04-25 Thread Jan Lehnardt (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt resolved COUCHDB-1103.
---

Resolution: Fixed

Committed the joint work of Benoit and me.

> Make vhost definitions not order-dependent, remove variable matching
> 
>
> Key: COUCHDB-1103
> URL: https://issues.apache.org/jira/browse/COUCHDB-1103
> Project: CouchDB
>  Issue Type: Bug
>  Components: HTTP Interface
>Affects Versions: 1.1, 1.2
>Reporter: Jan Lehnardt
>Assignee: Benoit Chesneau
>Priority: Critical
> Fix For: 1.1
>
> Attachments: 0001-Order-results-and-make-sure-we-use-default.patch, 
> 0001-fix-COUCHDB-1103.-Order-results-and-make-sure-we-use.patch, 
> 0001-fix-COUCHDB-1103.-Order-results-and-make-sure-we-use.patch
>
>
> As per 
> http://mail-archives.apache.org/mod_mbox/couchdb-dev/201103.mbox/%3cAANLkTin6zRiiFtKZoFa60DRVyOcF1dXzMYtNdKuX=z...@mail.gmail.com%3e
> Recording it here to not lose track.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (COUCHDB-1140) fetching _local docs by revision in URL fails

2011-04-25 Thread Robert Newson (JIRA)

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

Robert Newson commented on COUCHDB-1140:


*shrug* If we fix it, no one will report a ticket about it, which will save us 
time to focus on other things. :)

perhaps local docs should simply ignore revision entirely, it doesn't make 
sense since they can't replicate.

> fetching _local docs by revision in URL fails
> -
>
> Key: COUCHDB-1140
> URL: https://issues.apache.org/jira/browse/COUCHDB-1140
> Project: CouchDB
>  Issue Type: Bug
>  Components: HTTP Interface
>Affects Versions: 1.0.2, 1.1
>Reporter: Jan Lehnardt
>Priority: Minor
>
> Via dev@
> Hi,
> Seems like a bug. You need to pass the current rev in the body of the
> document. Passing it as ?rev= does not work at all.
> B.
> On 24 April 2011 19:39, Pedro Landeiro  wrote:
> Already tried that but the rev argument does not accept ("),  returns
> instead:
> {"error":"unknown_error","reason":"badarg"}
> On Sun, Apr 24, 2011 at 11:16 AM, Robert Newson 
> wrote:
> try ?rev="0-1"
> B.
> On 23 April 2011 22:41, Pedro Landeiro  wrote:
> Hi,
> I cannot retrieve a local doc by revision.
> I can get the doc like this:
> http://127.0.0.1:5984/thisisatempdb/_local/mylocaldoc
> {"_id":"_local/mylocaldoc","_rev":"0-1","name":"pedro","surname":"landeiro","islocal":"oh
> yeah"}
> but if I request the some doc with the revision:
> http://127.0.0.1:5984/thisisatempdb/_local/mylocaldoc?rev=0-1
> {"error":"not_found","reason":"missing"}
> Am i doing some wrong?
> Thanks.
> --
> Pedro Landeiro
> http://www.linkedin.com/in/pedrolandeiro
> --
> Pedro Landeiro
> http://www.linkedin.com/in/pedrolandeiro

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Re: [jira] [Commented] (COUCHDB-1140) fetching _local docs by revision in URL fails

2011-04-25 Thread Pedro Landeiro
Hi,

I was just testing this "feature" for a new node.js client lib i'm creating.
I based this test on the documentation here:
http://techzone.couchbase.com/sites/default/files/uploads/all/documentation/couchbase-api-localdb.html#couchbase-api-localdb_db-local-localdoc_get

Thanks for your support.

On Mon, Apr 25, 2011 at 6:37 PM, Damien Katz (JIRA)  wrote:

>
>[
> https://issues.apache.org/jira/browse/COUCHDB-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13024871#comment-13024871]
>
> Damien Katz commented on COUCHDB-1140:
> --
>
> I don't consider this a bug as we don't store previous revisions of local
> docs like we do for regular docs (and technically, getting docs by older
> revision wasn't every really supposed to be a feature). The error message
> could probably be better here though.
>
> > fetching _local docs by revision in URL fails
> > -
> >
> > Key: COUCHDB-1140
> > URL: https://issues.apache.org/jira/browse/COUCHDB-1140
> > Project: CouchDB
> >  Issue Type: Bug
> >  Components: HTTP Interface
> >Affects Versions: 1.0.2, 1.1
> >Reporter: Jan Lehnardt
> >Priority: Minor
> >
> > Via dev@
> > Hi,
> > Seems like a bug. You need to pass the current rev in the body of the
> > document. Passing it as ?rev= does not work at all.
> > B.
> > On 24 April 2011 19:39, Pedro Landeiro  wrote:
> > Already tried that but the rev argument does not accept ("),  returns
> > instead:
> > {"error":"unknown_error","reason":"badarg"}
> > On Sun, Apr 24, 2011 at 11:16 AM, Robert Newson  >wrote:
> > try ?rev="0-1"
> > B.
> > On 23 April 2011 22:41, Pedro Landeiro  wrote:
> > Hi,
> > I cannot retrieve a local doc by revision.
> > I can get the doc like this:
> > http://127.0.0.1:5984/thisisatempdb/_local/mylocaldoc
> >
> {"_id":"_local/mylocaldoc","_rev":"0-1","name":"pedro","surname":"landeiro","islocal":"oh
> > yeah"}
> > but if I request the some doc with the revision:
> > http://127.0.0.1:5984/thisisatempdb/_local/mylocaldoc?rev=0-1
> > {"error":"not_found","reason":"missing"}
> > Am i doing some wrong?
> > Thanks.
> > --
> > Pedro Landeiro
> > http://www.linkedin.com/in/pedrolandeiro
> > --
> > Pedro Landeiro
> > http://www.linkedin.com/in/pedrolandeiro
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>



-- 
Pedro Landeiro
http://www.linkedin.com/in/pedrolandeiro


[jira] [Commented] (COUCHDB-1140) fetching _local docs by revision in URL fails

2011-04-25 Thread Damien Katz (JIRA)

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

Damien Katz commented on COUCHDB-1140:
--

I don't consider this a bug as we don't store previous revisions of local docs 
like we do for regular docs (and technically, getting docs by older revision 
wasn't every really supposed to be a feature). The error message could probably 
be better here though.

> fetching _local docs by revision in URL fails
> -
>
> Key: COUCHDB-1140
> URL: https://issues.apache.org/jira/browse/COUCHDB-1140
> Project: CouchDB
>  Issue Type: Bug
>  Components: HTTP Interface
>Affects Versions: 1.0.2, 1.1
>Reporter: Jan Lehnardt
>Priority: Minor
>
> Via dev@
> Hi,
> Seems like a bug. You need to pass the current rev in the body of the
> document. Passing it as ?rev= does not work at all.
> B.
> On 24 April 2011 19:39, Pedro Landeiro  wrote:
> Already tried that but the rev argument does not accept ("),  returns
> instead:
> {"error":"unknown_error","reason":"badarg"}
> On Sun, Apr 24, 2011 at 11:16 AM, Robert Newson 
> wrote:
> try ?rev="0-1"
> B.
> On 23 April 2011 22:41, Pedro Landeiro  wrote:
> Hi,
> I cannot retrieve a local doc by revision.
> I can get the doc like this:
> http://127.0.0.1:5984/thisisatempdb/_local/mylocaldoc
> {"_id":"_local/mylocaldoc","_rev":"0-1","name":"pedro","surname":"landeiro","islocal":"oh
> yeah"}
> but if I request the some doc with the revision:
> http://127.0.0.1:5984/thisisatempdb/_local/mylocaldoc?rev=0-1
> {"error":"not_found","reason":"missing"}
> Am i doing some wrong?
> Thanks.
> --
> Pedro Landeiro
> http://www.linkedin.com/in/pedrolandeiro
> --
> Pedro Landeiro
> http://www.linkedin.com/in/pedrolandeiro

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Re: Problems getting local doc by revision

2011-04-25 Thread Jan Lehnardt
So we don't forget:

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

Cheers
Jan
-- 

On 24 Apr 2011, at 21:41, Robert Newson wrote:

> Hi,
> 
> Seems like a bug. You need to pass the current rev in the body of the
> document. Passing it as ?rev= does not work at all.
> 
> B.
> 
> On 24 April 2011 19:39, Pedro Landeiro  wrote:
>> Already tried that but the rev argument does not accept ("),  returns
>> instead:
>> 
>> {"error":"unknown_error","reason":"badarg"}
>> 
>> 
>> 
>> On Sun, Apr 24, 2011 at 11:16 AM, Robert Newson 
>> wrote:
>> 
>>> try ?rev="0-1"
>>> 
>>> B.
>>> 
>>> On 23 April 2011 22:41, Pedro Landeiro  wrote:
 Hi,
 
 I cannot retrieve a local doc by revision.
 
 I can get the doc like this:
 http://127.0.0.1:5984/thisisatempdb/_local/mylocaldoc
 
 
 
>>> {"_id":"_local/mylocaldoc","_rev":"0-1","name":"pedro","surname":"landeiro","islocal":"oh
 yeah"}
 
 
 but if I request the some doc with the revision:
 http://127.0.0.1:5984/thisisatempdb/_local/mylocaldoc?rev=0-1
 
 {"error":"not_found","reason":"missing"}
 
 
 Am i doing some wrong?
 
 Thanks.
 
 --
 Pedro Landeiro
 http://www.linkedin.com/in/pedrolandeiro
 
>>> 
>> 
>> 
>> 
>> --
>> Pedro Landeiro
>> http://www.linkedin.com/in/pedrolandeiro
>> 



[jira] [Created] (COUCHDB-1140) fetching _local docs by revision in URL fails

2011-04-25 Thread Jan Lehnardt (JIRA)
fetching _local docs by revision in URL fails
-

 Key: COUCHDB-1140
 URL: https://issues.apache.org/jira/browse/COUCHDB-1140
 Project: CouchDB
  Issue Type: Bug
  Components: HTTP Interface
Affects Versions: 1.0.2, 1.1
Reporter: Jan Lehnardt
Priority: Minor


Via dev@

Hi,

Seems like a bug. You need to pass the current rev in the body of the
document. Passing it as ?rev= does not work at all.

B.

On 24 April 2011 19:39, Pedro Landeiro  wrote:
Already tried that but the rev argument does not accept ("),  returns
instead:

{"error":"unknown_error","reason":"badarg"}



On Sun, Apr 24, 2011 at 11:16 AM, Robert Newson wrote:

try ?rev="0-1"

B.

On 23 April 2011 22:41, Pedro Landeiro  wrote:
Hi,

I cannot retrieve a local doc by revision.

I can get the doc like this:
http://127.0.0.1:5984/thisisatempdb/_local/mylocaldoc



{"_id":"_local/mylocaldoc","_rev":"0-1","name":"pedro","surname":"landeiro","islocal":"oh
yeah"}


but if I request the some doc with the revision:
http://127.0.0.1:5984/thisisatempdb/_local/mylocaldoc?rev=0-1

{"error":"not_found","reason":"missing"}


Am i doing some wrong?

Thanks.

--
Pedro Landeiro
http://www.linkedin.com/in/pedrolandeiro





--
Pedro Landeiro
http://www.linkedin.com/in/pedrolandeiro


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (COUCHDB-1103) Make vhost definitions not order-dependent, remove variable matching

2011-04-25 Thread Jan Lehnardt (JIRA)

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

Jan Lehnardt commented on COUCHDB-1103:
---

@Benoit, the patch looks good.

Small nitpick: there's a debugging leftover in 160*.t

I've been working in my own version, but focussed on a different angle. Things 
I have in addition:

 1: 160*.t: Use proplist:is_defined instead of relying on result order and 
pattern matching.
 2: Half of an implementation to test http, http+https and https-only 
configurations.

Patch for 1: http://friendpaste.com/ElSBMc3Q2LBNMjlg1ECPw
Patch for 2 is still rough and I'm happy to delay this one in favour of getting 
the ticket resolved and 1.1.0 out. I manually confirmed that the code works in 
all configurations.

> Make vhost definitions not order-dependent, remove variable matching
> 
>
> Key: COUCHDB-1103
> URL: https://issues.apache.org/jira/browse/COUCHDB-1103
> Project: CouchDB
>  Issue Type: Bug
>  Components: HTTP Interface
>Affects Versions: 1.1, 1.2
>Reporter: Jan Lehnardt
>Assignee: Benoit Chesneau
>Priority: Critical
> Fix For: 1.1
>
> Attachments: 0001-Order-results-and-make-sure-we-use-default.patch, 
> 0001-fix-COUCHDB-1103.-Order-results-and-make-sure-we-use.patch, 
> 0001-fix-COUCHDB-1103.-Order-results-and-make-sure-we-use.patch
>
>
> As per 
> http://mail-archives.apache.org/mod_mbox/couchdb-dev/201103.mbox/%3cAANLkTin6zRiiFtKZoFa60DRVyOcF1dXzMYtNdKuX=z...@mail.gmail.com%3e
> Recording it here to not lose track.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira