Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 42475 invoked from network); 11 Dec 2008 21:04:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Dec 2008 21:04:18 -0000 Received: (qmail 46937 invoked by uid 500); 11 Dec 2008 21:04:30 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 46700 invoked by uid 500); 11 Dec 2008 21:04:29 -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 46689 invoked by uid 99); 11 Dec 2008 21:04:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2008 13:04:29 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of antony.blakey@gmail.com designates 209.85.142.184 as permitted sender) Received: from [209.85.142.184] (HELO ti-out-0910.google.com) (209.85.142.184) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2008 21:04:08 +0000 Received: by ti-out-0910.google.com with SMTP id a1so722342tib.3 for ; Thu, 11 Dec 2008 13:03:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=Gk4+eQuZJ13MKDzA9pXLwHtRgjHtPHUb4JvHRH04r3s=; b=H/biOpnkRzGWsot1JWoiSdjDrxKSkAyhPrsw/iI5vPFxmwlhzgcybdO2ujmjaWTsOv 2yL/2ZK25tecMdHpwVC8Nk2whl5CLumzRzR36jq1PrsBEIhe8d0+KHOmAFwEEn9pU0Q8 XaAhct13GRa8Cwirijvr5aebuLedsDuQ+wPR4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=VKCClPcvaSg+PSWcjOVRxmy9VS5igdxr2WWg3TrmHlMILnHCJ6NpT1qnGLK6qCTANM CJeXGcfAkPA6UidCH+28thTUmFfLx9PMsk7j55M3hjDBaZVy5hH8ys7WZ2gIIAnqr104 uDRDXLNAv102G38UOkMleZMD+JPWznGV9Jlzk= Received: by 10.110.53.19 with SMTP id b19mr4215107tia.39.1229029427076; Thu, 11 Dec 2008 13:03:47 -0800 (PST) Received: from ?192.168.0.16? (ppp121-45-41-103.lns10.adl2.internode.on.net [121.45.41.103]) by mx.google.com with ESMTPS id w5sm1786894tib.14.2008.12.11.13.03.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Dec 2008 13:03:46 -0800 (PST) Message-Id: <81DEB393-6725-40F5-860C-FD9FB56D6B83@gmail.com> From: Antony Blakey To: dev@couchdb.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: slash escaping (was 0.9.0 Release) Date: Fri, 12 Dec 2008 07:33:39 +1030 References: <0EC6A3E0-15BA-4BBB-A0A3-9ED9D04E3C40@apache.org> X-Mailer: Apple Mail (2.929.2) X-Virus-Checked: Checked by ClamAV on apache.org On 12/12/2008, at 6:58 AM, Antony Blakey wrote: > So the guidance is that users must not use document names starting > with '_' if they want to avoid astonishment? > > The other alternate is to always require the component after the db > to be 'special' i.e. document URLs could be > > /db/_/docid%2Fwith%2Fslashes/afile/with/nested/slashes > > No special rules required. IMO this example makes clear the cause of > the issue. I got the wrong end of the stick with that idea - this indicates the confusion of non-uniformity. Or maybe just the confusion of me :/ IMO design documents should be treated exactly like normal documents. Why have any special rules (apart from couch *reacting* to docs with an ID starting with '_design')? Uniformity of interface to me suggests that there be no special URL handling based on ID. Regardless of that: given your scheme, do you imagine that the following two would be equivalent? /db/_design/name%2Fwith%2Fslashes/afile/with/nested/slashes /db/_design%2Fname%2Fwith%2Fslashes/afile/with/nested/slashes > Also, provide a handler that returns a json document associating > filenames with the original name. And when a file is created in the db directory, write this mapping to 'filename-mapping.json', in the db directory, so that it's accessible even if Couch is down. Antony Blakey ------------- CTO, Linkuistics Pty Ltd Ph: 0438 840 787 Borrow money from pessimists - they don't expect it back. -- Steven Wright