incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Blakey <antony.bla...@gmail.com>
Subject Re: slash escaping (was 0.9.0 Release)
Date Thu, 11 Dec 2008 21:03:39 GMT

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



Mime
View raw message