You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Jan Lehnardt (JIRA)" <ji...@apache.org> on 2011/04/16 21:20:05 UTC
[jira] [Resolved] (COUCHDB-1113) GET requests fail against a list
if they have content-type x-www-form-urlencoded
[ https://issues.apache.org/jira/browse/COUCHDB-1113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Lehnardt resolved COUCHDB-1113.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.2
1.1
1.0.3
> GET requests fail against a list if they have content-type x-www-form-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
> Labels: erlang, javascript, list
> Fix For: 1.0.3, 1.1, 1.2
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> 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