[jira] Commented: (COUCHDB-891) Allow ?keys=[a,b] for GET to _view and _list

2010-10-11 Thread Paul Joseph Davis (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12919995#action_12919995
 ] 

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

Does anyone not want this in trunk? I applied it and ran the tests. Everything 
is kosher from that point of view.

 Allow ?keys=[a,b] for GET to _view and _list
 

 Key: COUCHDB-891
 URL: https://issues.apache.org/jira/browse/COUCHDB-891
 Project: CouchDB
  Issue Type: New Feature
  Components: HTTP Interface
Affects Versions: 1.0.1
 Environment: -
Reporter: Michael Fellinger
Priority: Minor
 Fix For: 1.0.2

 Attachments: get_keys_param_with_tests.diff


 The idea was already described back in 2008 when the POST 
 {keys:[key1,key2]} API was introduced.
 http://mail-archives.apache.org/mod_mbox/couchdb-dev/200811.mbox/%3c4910d88a.8000...@kore-nordmann.de%3e
 I'm looking at the source right now, but can't figure out how to implement 
 this at the moment, and I'd love this to be part of CouchDB proper.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (COUCHDB-891) Allow ?keys=[a,b] for GET to _view and _list

2010-10-05 Thread Paul Joseph Davis (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12918027#action_12918027
 ] 

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

Just realized I forgot to tell you to add javascript tests. There's a place 
where the current keys POST is tested. adding similar tests near there would be 
sufficient.

 Allow ?keys=[a,b] for GET to _view and _list
 

 Key: COUCHDB-891
 URL: https://issues.apache.org/jira/browse/COUCHDB-891
 Project: CouchDB
  Issue Type: New Feature
  Components: HTTP Interface
Affects Versions: 1.0.1
 Environment: -
Reporter: Michael Fellinger
Priority: Minor
 Fix For: 1.0.2

 Attachments: 
 0001-add-keys-query-string-parameter-to-GET-request-of-vi.patch


 The idea was already described back in 2008 when the POST 
 {keys:[key1,key2]} API was introduced.
 http://mail-archives.apache.org/mod_mbox/couchdb-dev/200811.mbox/%3c4910d88a.8000...@kore-nordmann.de%3e
 I'm looking at the source right now, but can't figure out how to implement 
 this at the moment, and I'd love this to be part of CouchDB proper.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (COUCHDB-891) Allow ?keys=[a,b] for GET to _view and _list

2010-10-05 Thread Robert Newson (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12918032#action_12918032
 ] 

Robert Newson commented on COUCHDB-891:
---

What happened about the concern that this new function will work for short 
lists and then fail (with no remedy) for longer ones?

 Allow ?keys=[a,b] for GET to _view and _list
 

 Key: COUCHDB-891
 URL: https://issues.apache.org/jira/browse/COUCHDB-891
 Project: CouchDB
  Issue Type: New Feature
  Components: HTTP Interface
Affects Versions: 1.0.1
 Environment: -
Reporter: Michael Fellinger
Priority: Minor
 Fix For: 1.0.2

 Attachments: 
 0001-add-keys-query-string-parameter-to-GET-request-of-vi.patch


 The idea was already described back in 2008 when the POST 
 {keys:[key1,key2]} API was introduced.
 http://mail-archives.apache.org/mod_mbox/couchdb-dev/200811.mbox/%3c4910d88a.8000...@kore-nordmann.de%3e
 I'm looking at the source right now, but can't figure out how to implement 
 this at the moment, and I'd love this to be part of CouchDB proper.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (COUCHDB-891) Allow ?keys=[a,b] for GET to _view and _list

2010-10-05 Thread Paul Joseph Davis (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12918039#action_12918039
 ] 

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

I think the remedy of longer lists is that you use POST. I think the concern is 
fine, but its not like we don't have the same concern for anything else that's 
user specifiable and appears in the URL. For instance, there's no length limit 
on document id's or attachment names which can hit the same URL length issue. 

Also, the method allows for cacheing when the POST method doesn't.





 Allow ?keys=[a,b] for GET to _view and _list
 

 Key: COUCHDB-891
 URL: https://issues.apache.org/jira/browse/COUCHDB-891
 Project: CouchDB
  Issue Type: New Feature
  Components: HTTP Interface
Affects Versions: 1.0.1
 Environment: -
Reporter: Michael Fellinger
Priority: Minor
 Fix For: 1.0.2

 Attachments: 
 0001-add-keys-query-string-parameter-to-GET-request-of-vi.patch


 The idea was already described back in 2008 when the POST 
 {keys:[key1,key2]} API was introduced.
 http://mail-archives.apache.org/mod_mbox/couchdb-dev/200811.mbox/%3c4910d88a.8000...@kore-nordmann.de%3e
 I'm looking at the source right now, but can't figure out how to implement 
 this at the moment, and I'd love this to be part of CouchDB proper.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (COUCHDB-891) Allow ?keys=[a,b] for GET to _view and _list

2010-10-04 Thread Paul Joseph Davis (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12917852#action_12917852
 ] 

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

Looks like you forgot to add support for _all_docs. Other than that the patch 
looks great.

 Allow ?keys=[a,b] for GET to _view and _list
 

 Key: COUCHDB-891
 URL: https://issues.apache.org/jira/browse/COUCHDB-891
 Project: CouchDB
  Issue Type: New Feature
  Components: HTTP Interface
Affects Versions: 1.0.1
 Environment: -
Reporter: Michael Fellinger
Priority: Minor
 Fix For: 1.0.2

 Attachments: 
 0001-add-keys-query-string-parameter-to-GET-request-of-vi.patch


 The idea was already described back in 2008 when the POST 
 {keys:[key1,key2]} API was introduced.
 http://mail-archives.apache.org/mod_mbox/couchdb-dev/200811.mbox/%3c4910d88a.8000...@kore-nordmann.de%3e
 I'm looking at the source right now, but can't figure out how to implement 
 this at the moment, and I'd love this to be part of CouchDB proper.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (COUCHDB-891) Allow ?keys=[a,b] for GET to _view and _list

2010-10-04 Thread Paul Joseph Davis (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12917869#action_12917869
 ] 

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

Instead of attaching two patches you should condense them into a single patch.

You said your git-fu is still growing so the easiest way is to git diff between 
your branch and trunk. Once your git-fu grows, the usual method would be to 
interactively rebase your changes into a single commit. That sounds scarier 
than it is, and once you learn it you'll understand why git people can no 
longer use svn.

 Allow ?keys=[a,b] for GET to _view and _list
 

 Key: COUCHDB-891
 URL: https://issues.apache.org/jira/browse/COUCHDB-891
 Project: CouchDB
  Issue Type: New Feature
  Components: HTTP Interface
Affects Versions: 1.0.1
 Environment: -
Reporter: Michael Fellinger
Priority: Minor
 Fix For: 1.0.2

 Attachments: 0001-add-GET-keys-parameter-to-_all_docs-handler.patch, 
 0001-add-keys-query-string-parameter-to-GET-request-of-vi.patch


 The idea was already described back in 2008 when the POST 
 {keys:[key1,key2]} API was introduced.
 http://mail-archives.apache.org/mod_mbox/couchdb-dev/200811.mbox/%3c4910d88a.8000...@kore-nordmann.de%3e
 I'm looking at the source right now, but can't figure out how to implement 
 this at the moment, and I'd love this to be part of CouchDB proper.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (COUCHDB-891) Allow ?keys=[a,b] for GET to _view and _list

2010-10-01 Thread Chris Anderson (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12917051#action_12917051
 ] 

Chris Anderson commented on COUCHDB-891:


I think this would also be a good intro patch for someone new to the codebase.

 Allow ?keys=[a,b] for GET to _view and _list
 

 Key: COUCHDB-891
 URL: https://issues.apache.org/jira/browse/COUCHDB-891
 Project: CouchDB
  Issue Type: New Feature
  Components: HTTP Interface
Affects Versions: 1.0.1
 Environment: -
Reporter: Michael Fellinger
Priority: Minor
 Fix For: 1.0.2


 The idea was already described back in 2008 when the POST 
 {keys:[key1,key2]} API was introduced.
 http://mail-archives.apache.org/mod_mbox/couchdb-dev/200811.mbox/%3c4910d88a.8000...@kore-nordmann.de%3e
 I'm looking at the source right now, but can't figure out how to implement 
 this at the moment, and I'd love this to be part of CouchDB proper.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: [jira] Commented: (COUCHDB-891) Allow ?keys=[a,b] for GET to _view and _list

2010-10-01 Thread Paul Davis
I'm not unsympathetic to the concern, but there's already a few ways
to do other things. For instance, ever since we removed _bulk_docs
transaction semantics there's no actual reason to keep it around, but
we do. The might break as URI gets too long part I think is balanced
out by the benefits of things like being able to cache GET's and such
forth.

HTH,
Paul Davis

On Tue, Sep 21, 2010 at 10:01 AM, Sebastian Cohnen
sebastiancoh...@googlemail.com wrote:
 I'm not sure if I like the idea of having two ways accessing one 
 functionality. One that will always work and one, that might or might not 
 work, depending on the input (size).

 On 21.09.2010, at 15:55, Zachary Zolton wrote:

 You're also better off caching GET requests than POST requests, should
 the need ever arise.

 On Tue, Sep 21, 2010 at 3:09 AM, Michael Fellinger (JIRA)
 j...@apache.org wrote:

    [ 
 https://issues.apache.org/jira/browse/COUCHDB-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12912874#action_12912874
  ]

 Michael Fellinger commented on COUCHDB-891:
 ---

 If you don't know the size of the keys, you can use POST, I'm not 
 advocating this as a replacement, but as an alternative.
 My typical usage is to lookup up to a handful of keys, of known size, that 
 fit comfortably in any URI.

 I recently hit an issue while trying to implement a _list document for 
 FreeSWITCH (FS) configuration, that is queried directly.
 Unfortunately, i cannot redirect or rewrite the request for a _list with 
 keys via POST, and I cannot modify the way FS does its queries, so I had to 
 put a middleware in front just to handle this query for me.
 With GET, it would be trivial to handle this case, I'd leave it to the 
 developer to decide whether to use GET or POST.

 Allow ?keys=[a,b] for GET to _view and _list
 

                 Key: COUCHDB-891
                 URL: https://issues.apache.org/jira/browse/COUCHDB-891
             Project: CouchDB
          Issue Type: New Feature
          Components: HTTP Interface
    Affects Versions: 1.0.1
         Environment: -
            Reporter: Michael Fellinger
            Priority: Minor
             Fix For: 1.0.2


 The idea was already described back in 2008 when the POST 
 {keys:[key1,key2]} API was introduced.
 http://mail-archives.apache.org/mod_mbox/couchdb-dev/200811.mbox/%3c4910d88a.8000...@kore-nordmann.de%3e
 I'm looking at the source right now, but can't figure out how to implement 
 this at the moment, and I'd love this to be part of CouchDB proper.

 --
 This message is automatically generated by JIRA.
 -
 You can reply to this email to add a comment to the issue online.






[jira] Commented: (COUCHDB-891) Allow ?keys=[a,b] for GET to _view and _list

2010-09-21 Thread Sebastian Cohnen (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12912867#action_12912867
 ] 

Sebastian Cohnen commented on COUCHDB-891:
--

The problem with GET is that the length of the request is limited by (browser) 
implementation - RFC 2616 [1] does not specify a limit to the URI length. I 
think it's a very bad behavior if GET with keys works for X keys, but no longer 
for X+1. I'm also not sure what to win by this change...


[1] RFC 2616, 3.2.1 General Syntax:
 The HTTP protocol does not place any a priori limit on the length of
   a URI. Servers MUST be able to handle the URI of any resource they
   serve, and SHOULD be able to handle URIs of unbounded length if they
   provide GET-based forms that could generate such URIs. A server
   SHOULD return 414 (Request-URI Too Long) status if a URI is longer
   than the server can handle (see section 10.4.15).

  Note: Servers ought to be cautious about depending on URI lengths
  above 255 bytes, because some older client or proxy
  implementations might not properly support these lengths.

 Allow ?keys=[a,b] for GET to _view and _list
 

 Key: COUCHDB-891
 URL: https://issues.apache.org/jira/browse/COUCHDB-891
 Project: CouchDB
  Issue Type: New Feature
  Components: HTTP Interface
Affects Versions: 1.0.1
 Environment: -
Reporter: Michael Fellinger
Priority: Minor
 Fix For: 1.0.2


 The idea was already described back in 2008 when the POST 
 {keys:[key1,key2]} API was introduced.
 http://mail-archives.apache.org/mod_mbox/couchdb-dev/200811.mbox/%3c4910d88a.8000...@kore-nordmann.de%3e
 I'm looking at the source right now, but can't figure out how to implement 
 this at the moment, and I'd love this to be part of CouchDB proper.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: [jira] Commented: (COUCHDB-891) Allow ?keys=[a,b] for GET to _view and _list

2010-09-21 Thread Zachary Zolton
You're also better off caching GET requests than POST requests, should
the need ever arise.

On Tue, Sep 21, 2010 at 3:09 AM, Michael Fellinger (JIRA)
j...@apache.org wrote:

    [ 
 https://issues.apache.org/jira/browse/COUCHDB-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12912874#action_12912874
  ]

 Michael Fellinger commented on COUCHDB-891:
 ---

 If you don't know the size of the keys, you can use POST, I'm not advocating 
 this as a replacement, but as an alternative.
 My typical usage is to lookup up to a handful of keys, of known size, that 
 fit comfortably in any URI.

 I recently hit an issue while trying to implement a _list document for 
 FreeSWITCH (FS) configuration, that is queried directly.
 Unfortunately, i cannot redirect or rewrite the request for a _list with keys 
 via POST, and I cannot modify the way FS does its queries, so I had to put a 
 middleware in front just to handle this query for me.
 With GET, it would be trivial to handle this case, I'd leave it to the 
 developer to decide whether to use GET or POST.

 Allow ?keys=[a,b] for GET to _view and _list
 

                 Key: COUCHDB-891
                 URL: https://issues.apache.org/jira/browse/COUCHDB-891
             Project: CouchDB
          Issue Type: New Feature
          Components: HTTP Interface
    Affects Versions: 1.0.1
         Environment: -
            Reporter: Michael Fellinger
            Priority: Minor
             Fix For: 1.0.2


 The idea was already described back in 2008 when the POST 
 {keys:[key1,key2]} API was introduced.
 http://mail-archives.apache.org/mod_mbox/couchdb-dev/200811.mbox/%3c4910d88a.8000...@kore-nordmann.de%3e
 I'm looking at the source right now, but can't figure out how to implement 
 this at the moment, and I'd love this to be part of CouchDB proper.

 --
 This message is automatically generated by JIRA.
 -
 You can reply to this email to add a comment to the issue online.




Re: [jira] Commented: (COUCHDB-891) Allow ?keys=[a,b] for GET to _view and _list

2010-09-21 Thread Sebastian Cohnen
I'm not sure if I like the idea of having two ways accessing one functionality. 
One that will always work and one, that might or might not work, depending on 
the input (size).
 
On 21.09.2010, at 15:55, Zachary Zolton wrote:

 You're also better off caching GET requests than POST requests, should
 the need ever arise.
 
 On Tue, Sep 21, 2010 at 3:09 AM, Michael Fellinger (JIRA)
 j...@apache.org wrote:
 
[ 
 https://issues.apache.org/jira/browse/COUCHDB-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12912874#action_12912874
  ]
 
 Michael Fellinger commented on COUCHDB-891:
 ---
 
 If you don't know the size of the keys, you can use POST, I'm not advocating 
 this as a replacement, but as an alternative.
 My typical usage is to lookup up to a handful of keys, of known size, that 
 fit comfortably in any URI.
 
 I recently hit an issue while trying to implement a _list document for 
 FreeSWITCH (FS) configuration, that is queried directly.
 Unfortunately, i cannot redirect or rewrite the request for a _list with 
 keys via POST, and I cannot modify the way FS does its queries, so I had to 
 put a middleware in front just to handle this query for me.
 With GET, it would be trivial to handle this case, I'd leave it to the 
 developer to decide whether to use GET or POST.
 
 Allow ?keys=[a,b] for GET to _view and _list
 
 
 Key: COUCHDB-891
 URL: https://issues.apache.org/jira/browse/COUCHDB-891
 Project: CouchDB
  Issue Type: New Feature
  Components: HTTP Interface
Affects Versions: 1.0.1
 Environment: -
Reporter: Michael Fellinger
Priority: Minor
 Fix For: 1.0.2
 
 
 The idea was already described back in 2008 when the POST 
 {keys:[key1,key2]} API was introduced.
 http://mail-archives.apache.org/mod_mbox/couchdb-dev/200811.mbox/%3c4910d88a.8000...@kore-nordmann.de%3e
 I'm looking at the source right now, but can't figure out how to implement 
 this at the moment, and I'd love this to be part of CouchDB proper.
 
 --
 This message is automatically generated by JIRA.
 -
 You can reply to this email to add a comment to the issue online.