couchdb-dev mailing list archives

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

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

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

The root of this is that the parse_view_parameters function is much more strict that the average
URL in CouchDB. Most end points only check what they use if they even check beyond the standard
Erlang assume true, barf on error method.

As Simon mentions, the two avenues are either a) go through and beef up URL parameters throughout,
or b) relax parameter handling for view queries. The relaxation that'd be needed would be
fairly trivial. The code is already there to even trigger it with an ignore_extra=True (for
this case at least). On the other hand, tightening all other URL's would be quite arduous
at best. Someone would have to find every URL, and then find every parameter that might be
used, and then write all the logic for values those parameters might take.

I'm open to either approach.

> 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
>            Priority: Minor
>
> 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