From leo.zovic at gmail.com Sat Sep 24 13:51:04 2011 From: leo.zovic at gmail.com (Leo Zovic) Date: Sat, 24 Sep 2011 09:51:04 -0400 Subject: [clouchdb-devel] Issue Message-ID: Hey guys. I tried out clouchdb yesterday and got an error while trying to have CouchDB generate the ID for a document. Reason "Content-Type must be application/json", Document ID: "NIL" [Condition of type DOC-ERROR] Restarts: 0: [RETRY] Retry SLIME REPL evaluation request. 1: [*ABORT] Return to SLIME's top level. 2: [TERMINATE-THREAD] Terminate this thread (#) Backtrace: 0: (POST-DOCUMENT ((:|name| . "wine") (:|tags| "beverage" "fun" "alcoholic"))) 1: (SB-INT:SIMPLE-EVAL-IN-LEXENV (CREATE-DOCUMENT '((:|name| . "wine") (:|tags| "beverage" "fun" "alcoholic"))) #) --more-- It seems that the DB now wants everything with the content-type "application/json" (though creating a document while specifying the ID works properly even though it's still being set to "text/javascript"). Your site doesn't list this issue, so I thought I'd bring it to your attention. This seems to fix it (based on the clouchdb source from quicklisp): --- clouchdb.lispOLD 2011-09-24 09:38:20.000000000 -0400 +++ clouchdb.lisp 2011-09-24 09:38:58.000000000 -0400 @@ -753,7 +753,7 @@ the :ID property." (let ((res (ensure-db () (db-request (cat (url-encode (db-name *couchdb*)) "/") - :content-type "text/javascript" + :content-type "application/json" :external-format-out +utf-8+ :content-length nil :method :post -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter.eddy at gmail.com Sat Sep 24 17:05:35 2011 From: peter.eddy at gmail.com (Peter Eddy) Date: Sat, 24 Sep 2011 13:05:35 -0400 Subject: [clouchdb-devel] Issue In-Reply-To: References: Message-ID: Thanks for the patch, Leo, The main problem right now is that my current employer has a horrendous employment agreement that says that they own anything I work on, and that makes it impossible to update this project. I hope to remedy my employment situation shortly and start updating this project again. - Peter On Sat, Sep 24, 2011 at 9:51 AM, Leo Zovic wrote: > Hey guys. > > I tried out clouchdb yesterday and got an error while trying to have CouchDB > generate the ID for a document. > > Reason "Content-Type must be application/json", Document ID: "NIL" > ?? [Condition of type DOC-ERROR] > > Restarts: > ?0: [RETRY] Retry SLIME REPL evaluation request. > ?1: [*ABORT] Return to SLIME's top level. > ?2: [TERMINATE-THREAD] Terminate this thread (# {10040D2E11}>) > > Backtrace: > ? 0: (POST-DOCUMENT ((:|name| . "wine") (:|tags| "beverage" "fun" > "alcoholic"))) > ? 1: (SB-INT:SIMPLE-EVAL-IN-LEXENV (CREATE-DOCUMENT '((:|name| . "wine") > (:|tags| "beverage" "fun" "alcoholic"))) #) > ?--more-- > > It seems that the DB now wants everything with the content-type > "application/json" (though creating a document while specifying the ID works > properly even though it's still being set to "text/javascript"). > > Your site doesn't list this issue, so I thought I'd bring it to your > attention. > > This seems to fix it (based on the clouchdb source from quicklisp): > > --- clouchdb.lispOLD??? 2011-09-24 09:38:20.000000000 -0400 > +++ clouchdb.lisp??? 2011-09-24 09:38:58.000000000 -0400 > @@ -753,7 +753,7 @@ > ?the :ID property." > ?? (let ((res (ensure-db () > ??????????????? (db-request (cat (url-encode (db-name *couchdb*)) "/") > -?????????????????????????? :content-type "text/javascript" > +?????????????????????????? :content-type "application/json" > ??????????????????????????? :external-format-out +utf-8+ > ??????????????????????????? :content-length nil > ??????????????????????????? :method :post > > _______________________________________________ > clouchdb-devel mailing list > clouchdb-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/clouchdb-devel > >