GET requests fail against a list if they have content-type x-wwwform-urlencoded
-------------------------------------------------------------------------------
Key: COUCHDB-1113
URL: https://issues.apache.org/jira/browse/COUCHDB-1113
Project: CouchDB
Issue Type: Bug
Components: HTTP Interface
Affects Versions: 1.0.2
Environment: all, but particularly JQuery
Reporter: Dennis Clark
Priority: Minor
Given a design doc like:
{
views: {whatever...}
lists: {myList: function (head, req) { ...}}
}
an ajax request in JQuery like:
$.get("/db/_design/ddoc/_list/myList/whatever", function (data) {...});
will fail with a 500 error of type function_clause. This appears to be because
CouchDB is attempting to parse the empty form it assumes must be there based on
the content type and mochiweb's parser fails.
Of course, if you try the same url in a browser or with curl, it'll work
perfectly.
This may be for deep reasons beyond my ken, but the silent failure of the HTTP
API in this case seems like a problem. At the very least, an informative error
message would be good.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira