couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Candler (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-383) HTTP get parameter strictness/looseness
Date Sun, 21 Jun 2009 12:24:07 GMT

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

Brian Candler commented on COUCHDB-383:
---------------------------------------

If you're gonna fully relax, then I think you might also want to accept things like reduce=false
on a map-only view. (Perhaps even ignore reduce=true too?)

Right now, nonsense like 'reducz=false' is accepted, but the reasonable 'reduce=false' is
not:

$ curl http://127.0.0.1:5984/
{"couchdb":"Welcome","version":"0.10.0a787002"}

$ curl 'http://127.0.0.1:5984/test/_design/test/_view/test?reduce=false'
{"error":"query_parse_error","reason":"Invalid URL parameter `reduce` for map view."}

This is a pain, given that map-reduce views default to reduce=true. That is, if you know you
only want the map part of the view, but you don't know if it has a reduce part or not, you
may end up having to submit the query twice.


> HTTP get parameter strictness/looseness
> ---------------------------------------
>
>                 Key: COUCHDB-383
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-383
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.0
>         Environment: Linux Debian 5.0 (VMware image)
>            Reporter: Simon Thulbourn
>            Assignee: Paul Joseph Davis
>            Priority: Minor
>             Fix For: 0.10
>
>
> The use of GET params in a URL is either too loose or too strict depending on your point
of view.
> Adding extra GET params that are not needed to a query works on every request except
for /dbname/_all_docs, in this event CouchDB returns an error.
> Test Case:
> /foobar/_all_docs?callback=jsonp1244562168058&_=1244562168079 
> Returns: jsonp1244562168058({"error":"query_parse_error","reason":"Invalid URL parameter:
\"_\""});
> NOTE: this is not just a JSONP error, this is just how I found it.
> Ideally, CouchDB either needs to accept this or to error on every request with that contains
erroneous GET parameters.

-- 
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