couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Volker Mische <>
Subject Re: rewriter needed changes
Date Mon, 10 Jan 2011 11:03:44 GMT

On 10.01.2011 01:32, Benoit Chesneau wrote:
> 2. Use mongrel2 pattern matching:
> <snip>
> URL patterns always match from the start, routes are broken into
> prefix and pattern part. We uses the routes to find the longest
> matching prefix and then tests the pattern. If the pattern matches,
> then the route works. If the route doesn't have a pattern, then it's
> assumed to match, and you're done.
> The only caveat is you have to wrap your pattern parts in parenthesis,
> but these don't mean anything other than to delimit where a pattern
> starts. So instead of /images/.⋆.jpg, write /images/(.⋆.jpg) for it to
> work.
> [...]
> </snip>
> This solution is really simple, remove the useless things you have in
> regexp and give complete power to the users. Also this kind of parsing
> is relatively easy to do in erlang.
> [...]
> Any thoughts ?
> - benoît

I'm +1 for a more powerful rewriter. Though I haven't quite understood 
how those mongrel2 style rewrites will actually look like. I understand 
how to match a pattern, but how is it rewritten after that?


View raw message