[clouchdb-devel] Issue

Peter Eddy peter.eddy at gmail.com
Sat Sep 24 17:05:35 UTC 2011


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 <leo.zovic at gmail.com> 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 (#<THREAD "repl-thread" RUNNING
> {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"))) #<NULL-LEXENV>)
>  --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
>
>




More information about the clouchdb-devel mailing list