couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <jch...@apache.org>
Subject Re: %2f vs / in _design vs regular docs?
Date Sat, 07 Mar 2009 18:05:23 GMT
On Sat, Mar 7, 2009 at 12:49 AM, Wout Mertens <wout.mertens@gmail.com> wrote:
> Hi all,
>
> I noticed the following discrepancy: When you try to request a design
> document, and you encode the / as %2F, couchdb will redirect you to a URL
> with %2f decoded to /, which works.
>

> _show/wiki/showpage/section/subsection/page

The problem becomes distinguishing between documents and attachments.
Docids are always urlencoded, with the exception of _design/ docids,
which can be requested with the / unencoded (the redirect was put
there to make that rule self-documenting.)

Slashes in attachment names can also be used unencoded, so

/db/wiki/showpage/section/subsection/page address the attachment named
"showpage/section/subsection/page" on the document with id "wiki"

This was discussed intensively on this thread:
http://www.mail-archive.com/dev@couchdb.apache.org/msg00018.html

Here's a relevant ticket but the discussion was not on the ticket:
https://issues.apache.org/jira/browse/COUCHDB-167

Chris

-- 
Chris Anderson
http://jchris.mfdz.com

Mime
View raw message