Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 64517 invoked from network); 5 Mar 2011 11:58:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Mar 2011 11:58:40 -0000 Received: (qmail 39136 invoked by uid 500); 5 Mar 2011 11:58:38 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 39095 invoked by uid 500); 5 Mar 2011 11:58:38 -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 39087 invoked by uid 99); 5 Mar 2011 11:58:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Mar 2011 11:58:38 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bitroot@gmail.com designates 209.85.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-qy0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Mar 2011 11:58:32 +0000 Received: by qyk10 with SMTP id 10so2624174qyk.11 for ; Sat, 05 Mar 2011 03:58:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ndZdAWZ4dax/WzrxUxKqFL4sLUvSCG551wHB/FVRJIA=; b=erjDN4s9SnHOIYDhGNgAsbqipDyDCOCENzTNW3DgObvhlEHBBzbsLT5Mo1IBNC9Y4s h4t52c3vLhVc+rxO5KBUopxHwZpvvobMN9e6oWmE3zX9j4pYP7ufS5vYQMeVkF5iplBL rdehgnSNdIT9DQ2oZjd4Q3uPhWodLBH15JK3A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=aMxdlz8uNdIfUP3xPM0Gjjb+DeTqd3g/ZwLvtYX7xPVD+yujaFsvCKx0rymtnfLxyJ 7SWKbAMekLXFeGpXlVkXrBycUR0C8GkYDCLbYd/hPmyydz8VPmZ5Ln9lcBAH3e+Z0WQG wT7+bFOK7+gK9wnkR3C0dcm7voblrmo7gK+tA= MIME-Version: 1.0 Received: by 10.229.253.204 with SMTP id nb12mr1360378qcb.166.1299326291243; Sat, 05 Mar 2011 03:58:11 -0800 (PST) Sender: bitroot@gmail.com Received: by 10.229.237.197 with HTTP; Sat, 5 Mar 2011 03:58:11 -0800 (PST) In-Reply-To: References: Date: Sat, 5 Mar 2011 11:58:11 +0000 X-Google-Sender-Auth: piTOdnJ8alL6et8xNLTb9otUYLw Message-ID: Subject: Re: copy request in _users From: Joe Freeman To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I've never tried out COPY, but I suspect this is because when you copy the document over, the document's 'name' property stays the same ('q@q.qa'). When the new document is validated, it has an ID of 'org.couchdb.user:xxx', but the name property is 'q@q.qa'. The validation rule requires that the document ID is 'org.couchdb.user:' followed by the name. If you want to rename a user, you'll probably need to PUT the new user document manually with an updated 'name' property. On 5 March 2011 10:07, Mark Hahn wrote: > When I try a copy request in the _users db I get the error ... > > =A0 =A0403, forbidden, Doc ID must be of the form org.couchdb.user:name > > The request as shown in the couch log is : > > [debug] [<0.26409.36>] "COPY" /_users/org.couchdb.user%3Aq%40q.qa {1,1} > Headers: [{'Connection',"close"}, > =A0 =A0 =A0 =A0 =A0{'Content-Type',"application/json"}, > =A0 =A0 =A0 =A0 =A0{'Cookie'," ... snip ..."}, > =A0 =A0 =A0 =A0 =A0{"Destination","org.couchdb.user:xxx"}, > =A0 =A0 =A0 =A0 =A0{'Host',"localhost"}, > =A0 =A0 =A0 =A0 =A0{'Transfer-Encoding',"chunked"}] > > I've also tried encoding the Destination header > as {"Destination","org.couchdb.user%3Axxx"}. > > The request path is url encoded the same way as in all of my other workin= g > requests. The id shown above works in get, put, etc. =A0I'm using > jquery.couch.js so I'm pretty sure the only thing I could be doing wrong = is > the Destination header. jquery.couch.js is formatting everything but the > headers. > > Any ideas? >