Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 66175 invoked from network); 5 Feb 2009 06:46:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Feb 2009 06:46:10 -0000 Received: (qmail 84831 invoked by uid 500); 5 Feb 2009 06:46:04 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 84800 invoked by uid 500); 5 Feb 2009 06:46:04 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 84786 invoked by uid 99); 5 Feb 2009 06:46:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 22:46:04 -0800 X-ASF-Spam-Status: No, hits=2.4 required=10.0 tests=NORMAL_HTTP_TO_IP,SPF_PASS,URIBL_RHS_DOB,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of curious.attempt.bunny@gmail.com designates 74.125.46.30 as permitted sender) Received: from [74.125.46.30] (HELO yw-out-2324.google.com) (74.125.46.30) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2009 06:45:57 +0000 Received: by yw-out-2324.google.com with SMTP id 3so29055ywj.5 for ; Wed, 04 Feb 2009 22:45:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=HbdgMVtVinb4U8W48+u2Pj2UFSpHM6cbEpmDcjuDCLk=; b=dkL0wt4rfyNOnC5160pWI027B6/QxwNNIrt/b/CeNGjO0tT81zRWxMWpVA65vZFVZR yXCt6I+p9R5m6d74SboF46qeaBJ7AgVHrUIqs+cf0QqInvYl7F3dznLLlzESnqaa5or3 LOOuef7KgL65gW3N65kvozLPUMWJPqZIPKWrs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=obUZMLOe6BVspfjzElwluC7G/XhKOLjV5/ytawD9j+CGWI1AKLfyx28qgJ5Y3UjJdP yb12+tvBhPT/g896Ke7Dvxw8jwPR3bhRoBMhoiU3+Oheg8WyvwnT9XNglKWSBf5g2trg xX5A/1ntuLejl252eKMHOuO4h/UOV/adN7BwM= MIME-Version: 1.0 Received: by 10.150.57.17 with SMTP id f17mr255477yba.105.1233816336630; Wed, 04 Feb 2009 22:45:36 -0800 (PST) Date: Wed, 4 Feb 2009 22:45:36 -0800 Message-ID: <41197b6c0902042245k43edaf4cs2c2f1696167c4f90@mail.gmail.com> Subject: problem PUTting a document with an encoded attachment From: Merlyn Albery-Speyer To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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