Return-Path: Delivered-To: apmail-incubator-abdera-dev-archive@locus.apache.org Received: (qmail 2978 invoked from network); 8 Feb 2008 03:34:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2008 03:34:00 -0000 Received: (qmail 88286 invoked by uid 500); 8 Feb 2008 03:33:53 -0000 Delivered-To: apmail-incubator-abdera-dev-archive@incubator.apache.org Received: (qmail 88267 invoked by uid 500); 8 Feb 2008 03:33:53 -0000 Mailing-List: contact abdera-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-dev@incubator.apache.org Delivered-To: mailing list abdera-dev@incubator.apache.org Received: (qmail 88258 invoked by uid 99); 8 Feb 2008 03:33:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2008 19:33:52 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.208.4.194] (HELO mout.perfora.net) (74.208.4.194) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2008 03:33:22 +0000 Received: from [192.168.1.101] (pool-70-22-165-61.bos.east.verizon.net [70.22.165.61]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1JNJzQ1mJC-0002XT; Thu, 07 Feb 2008 22:33:25 -0500 Message-ID: <47ABCD89.10400@anconafamily.com> Date: Thu, 07 Feb 2008 22:33:29 -0500 From: Jim Ancona User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Abdera Dev List Subject: Route matching too liberal? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+PAygNN1Y2emy9mKy4LWhIhmq7NLkbZnRuml6 qqmtCEIQzicUJ9tHLckg+YnvTNpyKzeHDjGHVwdIKcwise/XLQ Eq9k7VKQ1r2J3tfDlc1cQ== X-Virus-Checked: Checked by ClamAV on apache.org I have run into some problems with my Routes matching unexpectedly. Before filing a bug, I thought I'd ask for feedback on whether the current behavior is correct. The current algorithm attempts to match the non-variable parts of the pattern, setting the variable to whatever is in between. So the pattern "/base/:collection/" matches both "/base/test/" and "/base/test/123/". In the second case, the value of the collection variable is "test/123". In my opinion, not allowing matches to span URI segments would be less prone to unintuitive results. FWIW, a quick glance at some docs on Ruby Routes seems to indicate that they do not span URI path segments. Thoughts? Jim