Hey guys.<br><br>I tried out clouchdb yesterday and got an error while trying to have CouchDB generate the ID for a document. <br><br>Reason "Content-Type must be application/json", Document ID: "NIL"<br>
   [Condition of type DOC-ERROR]<br><br>Restarts:<br> 0: [RETRY] Retry SLIME REPL evaluation request.<br> 1: [*ABORT] Return to SLIME's top level.<br> 2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" RUNNING {10040D2E11}>)<br>
<br>Backtrace:<br>  0: (POST-DOCUMENT ((:|name| . "wine") (:|tags| "beverage" "fun" "alcoholic")))<br>  1: (SB-INT:SIMPLE-EVAL-IN-LEXENV (CREATE-DOCUMENT '((:|name| . "wine") (:|tags| "beverage" "fun" "alcoholic"))) #<NULL-LEXENV>)<br>
 --more--<br><br>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").<br>
<br>Your site doesn't list this issue, so I thought I'd bring it to your attention.<br><br>This seems to fix it (based on the clouchdb source from quicklisp):<br><br>--- clouchdb.lispOLD    2011-09-24 09:38:20.000000000 -0400<br>
+++ clouchdb.lisp    2011-09-24 09:38:58.000000000 -0400<br>@@ -753,7 +753,7 @@<br> the :ID property."<br>   (let ((res (ensure-db ()<br>                (db-request (cat (url-encode (db-name *couchdb*)) "/")<br>
-                           :content-type "text/javascript"<br>+                           :content-type "application/json"<br>                            :external-format-out +utf-8+<br>                            :content-length nil<br>
                            :method :post<br>