From dev-return-6989-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Sat Oct 24 17:45:09 2009 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 14946 invoked from network); 24 Oct 2009 17:45:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Oct 2009 17:45:09 -0000 Received: (qmail 5826 invoked by uid 500); 24 Oct 2009 17:45:09 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 5749 invoked by uid 500); 24 Oct 2009 17:45:08 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 5739 invoked by uid 99); 24 Oct 2009 17:45:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Oct 2009 17:45:08 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 209.85.160.56 as permitted sender) Received: from [209.85.160.56] (HELO mail-pw0-f56.google.com) (209.85.160.56) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Oct 2009 17:45:06 +0000 Received: by pwi18 with SMTP id 18so2647373pwi.35 for ; Sat, 24 Oct 2009 10:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type; bh=s8vZvaeL+s4/ngXuDHZyDg9k65fxtQ0809ktutiJEJY=; b=a6wt+jpmSDbSf1cveFi4wK6T27rlmAM7EeJ0ydkXVouKXETzYbHha9Kuc1K517/2pL bA98TA3gSQEZ4PAWnbAPnqBRT8NEUZJWoWptyElGlSKfdeyQ1WWIkK4+UCK5rW4l1yyL Cj1V6AruXvw1SVkYhpfsmCV2MW8WpxhW+z3I8= 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; b=gC1/yyjfe5STIbPl3JX+SGCS83u66R5PIr8M9NYVnoHRiqlU4xVO2/kXeMwzMNA2Yz bO2Y8VmQG9xfPKduG6zZaXuiDwfLmpCefD4ww4gvZlu8C+P8YTj/BabZU59v389I08dv nO9rI5chbUvVHY2ipvcX4+54R0v/ErIFBt84I= MIME-Version: 1.0 Sender: jchris@gmail.com Received: by 10.142.3.13 with SMTP id 13mr907269wfc.302.1256406285892; Sat, 24 Oct 2009 10:44:45 -0700 (PDT) In-Reply-To: <4AE2B350.8050108@gmx.de> References: <4AD607EB.1020601@gmx.de> <4AD6148B.5090701@gmx.de> <4AE2B350.8050108@gmx.de> Date: Sat, 24 Oct 2009 10:44:45 -0700 X-Google-Sender-Auth: 425bff6591606c21 Message-ID: Subject: Re: Standalone CouchDB Applications without Javascript From: Chris Anderson To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 On Sat, Oct 24, 2009 at 12:57 AM, Sven Helmberger wrote: > Chris Anderson schrieb: >> >> I think the _update function can do this. It has access to the >> userCtx, so it could redirect to the list of users's items, or >> something. The point is you can programmatically control this, by >> sending the correct headers in the response to an _update action. >> >> I think this accomplishes your goals. If not, then I want to know more >> about your goals, because the motivation (pure HTML) is noble. >> > > Yes, this basically seems to provide what I need, except for one thing: I > can't send a PUT requests with pure HTML which means I can only create new > or objects or completely overwrite them. > > I know it's not the way REST should work etc, but unfortunately browsers > don't really care. So is there a possibility to at least optionally being > allowed to POST to a _update function with docId instead of PUT? > You should be allowed to POST to an _update function with a docid as well as PUT, heck you should be able to DELETE as well. I don't know how I feel about GET as I'm not sure accidental side effects are allowed. OK. Checked the code and fixed it to be more flexible about verbs for _update: http://svn.apache.org/viewvc?revision=829419&view=revision The new code allows anything other than GET (which includes HEAD for us). Sven, let me know if this solves your problem. Chris -- Chris Anderson http://jchrisa.net http://couch.io