couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Lehnardt (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (COUCHDB-1113) GET requests fail against a list if they have content-type x-www-form-urlencoded
Date Sat, 16 Apr 2011 19:20:05 GMT

     [ 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

Mime
View raw message