couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <jch...@gmail.com>
Subject Re: slash escaping (was 0.9.0 Release)
Date Sat, 13 Dec 2008 05:43:59 GMT
On Fri, Dec 12, 2008 at 9:31 PM, Antony Blakey <antony.blakey@gmail.com> wrote:
>
> On 13/12/2008, at 3:48 PM, Chris Anderson wrote:
>
>> Antony, I think you'll find that once you've written the appropriate
>> JavaScript tests for this feature, it'll be hard to resist adding
>> escaping to the Erlang db-name validation code.
>
> Actually, the name validation would merely consist of 'not-empty'.
>
> The gating issue is getting agreement about the on-disk structure, because
> the key change is breaking the name <=> filename equivalence assumption.
>

Sure - I guess I was referring to the call sites. Replacing the now
obsolete validation function with the URL encoder seems like a good
way to implement.

I'd approach the issue at the URL encoding/decoding side of the Erlang
stack-trace, just so we can have the same name format throughout the
codebase. If the current codebase is just looking at strings like
"Ser+vices%2Fnew+-+%E2%88%9E%E0%A4%B6%E0%A4%9B%D8%BA%D8%B4%EA%B0%A5%EA%B1%B8%E3%83%9A%E3%83%9C-lhxj+E81IP9xm+0ssUSsQ=="
then we'd know we don't have to worry about any high-byte problems.
The quoted string above is pretty close to legal under the current
ruleset.

This may be six of one, half-dozen of the other, but I know CouchDB's
character support is trustworthy so far, so it seems like introducing
the enhancements at the edges is a worthy goal.

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

Mime
View raw message