You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Jesse Hallett <ha...@gmail.com> on 2009/02/05 09:04:16 UTC

Re: [PDX.js] Re: problem PUTting a document with an encoded attachment

Hmm, trunk you say? I can work on that.

On Wed, Feb 4, 2009 at 11:57 PM, Chris Anderson <jc...@apache.org> wrote:
>
> Merlyn,
>
> I think pdxjs should start following trunk. I'm ready to help with the
> install if there's any trouble.
>
> Much of the wiki and many of the examples are designed to run against
> what will soon be the 0.9 release. But that may not be for a few
> weeks.
>
> Chris
>
> On Wed, Feb 4, 2009 at 10:45 PM, Merlyn Albery-Speyer
> <cu...@gmail.com> wrote:
>> Hey there, I'm using 0.8.1 and am working from the examples on the
>> HTTP_Document_API wiki page. I have what looks to me to be a well
>> formed PUT request yet couchdb complains. Here's my http request:
>>
>> PUT pdxjs/content HTTP/1.0
>> Content-Length: 581
>> Content-Type: application/json
>>
>> {
>>  "_id":"content",
>>  "_rev":"1170979794",
>>  "_attachments":
>>  {
>>    "tests.html":
>>    {
>>      "content_type":"text\/html",
>>      "data": "PGh0bWw+Cj......"
>>    }
>>  }
>> }
>>
>> The output I get in the couchdb log is:
>>
>> [error] [<0.57.0>] {error_report,<0.22.0>,
>>    {<0.57.0>,crash_report,
>>     [[{pid,<0.57.0>},
>>       {registered_name,[]},
>>       {error_info,
>>           {error,function_clause,
>>               [{mochiweb,new_request,
>>                    [{#Port<0.1273>,
>>                      {'PUT',"pdxjs/content",{1,0}},
>>                      [{'Content-Length',"581"},
>>                       {'Content-Type',"application/json"}]}]},
>>                {mochiweb_http,headers,4},
>>                {proc_lib,init_p_do_apply,3}]}},
>>       {initial_call,{mochiweb_socket_server,acceptor_loop,['Argument__1']}},
>>       {ancestors,[couch_httpd,couch_server_sup,<0.1.0>]},
>>       {messages,[]},
>>       {links,[<0.52.0>,#Port<0.1273>]},
>>       {dictionary,[]},
>>       {trap_exit,false},
>>       {status,running},
>>       {heap_size,377},
>>       {stack_size,23},
>>       {reductions,423}],
>>      []]}}
>> [error] [<0.52.0>] {error_report,<0.22.0>,
>>              {<0.52.0>,std_error,
>>               {mochiweb_socket_server,235,{child_error,function_clause}}}}
>>
>> =ERROR REPORT==== 4-Feb-2009::22:24:12 ===
>> {mochiweb_socket_server,235,{child_error,function_clause}}
>>
>> What am I missing here?
>>
>> The document does exist in the pdxjs database:
>>
>> $ curl http://127.0.0.1:5984/pdxjs/content
>> {"_id":"content","_rev":"1170979794"}
>>
>> PUTting a completely new document gives me the same problem. My test
>> suite passes in Futon. Any help is much appreciated.
>>
>> Cheers,
>> Merlyn
>>
>
>
>
> --
> Chris Anderson
> http://jchris.mfdz.com
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "Portland JavaScript Admirers" group.
> To post to this group, send email to pdxjs@googlegroups.com
> To unsubscribe from this group, send email to pdxjs+unsubscribe@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/pdxjs?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>