You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by jmoiron <jm...@jmoiron.net> on 2008/04/18 09:43:35 UTC

http interface bugs (_design & _bulk_docs)

Few issues in SVN trunk, version: "0.7.3a649361" 

This one found by kore_:

Design doc HTTP PUT fails:

PUT /blog/_design/posts HTTP/1.0
User-Agent: PycURL/7.16.4
Host: localhost:5984
Accept: */*
Content-Type: application/json
Content-Length: 1538
(...)

Reply:

HTTP/1.0 405 Method Not Allowed
Server: MochiWeb/1.0 (Any of you quaids got a smint?)
Date: Fri, 18 Apr 2008 06:41:20 GMT
Content-Length: 0
Allow: GET,HEAD

The server also sends TCP RST, which makes some libraries (like curl) very cranky.  The workaround is PUT /blog/_design%2fposts ...;  I'm not sure that this is intentional, but if it is, I don't think it's a good idea.  The other is that POSTing to _bulk_docs is failing;  it's failing my own tests as well as the unittests in python-couchdb's SVN.  Looks like this:

[Fri, 18 Apr 2008 07:33:34 GMT] [info] [<0.1842.0>] HTTP Error (code 500): {'EXIT',
                           {{badmatch,
                                {{obj,[{"type","Person"},{"name","John Doe"}]},
                                 {obj,
                                     [{"type","Person"},{"name","Mary Jane"}]},
                                 {obj,
                                     [{"type","City"},
                                      {"name","Gotham City"}]}}},
                            [{couch_httpd,handle_db_request,3},
                             {couch_httpd,handle_request,2},
                             {mochiweb_http,headers,4},
                             {proc_lib,init_p,5}]}}

Original posted json was:

[{"type": "Person", "name": "John Doe"}, {"type": "Person", "name": "Mary Jane"}, {"type": "City", "name": "Gotham City"}] 

-- Jason