David Wheeler <[EMAIL PROTECTED]> [12-05-2004 01:25]:
> On May 11, 2004, at 3:24 PM, Geoffrey Young wrote:
[...]
>> yeah, you can probably just check for DIR_MAGIC_TYPE here.
> Cool, saves the expense of the stat! Here's what I have now:
[...]
>     return DECLINED unless $r->content_type == DIR_MAGIC_TYPE
>       && $r->uri !~ m{/$};
[...]

Save the expense of the regexp as well. :-)

       return DECLINED unless $r->content_type == DIR_MAGIC_TYPE
-        && $r->uri !~ m{/$};
+        && substr($r->uri, -1, 1) ne '/';

-- 
Radosław Zieliński <[EMAIL PROTECTED]>
[ GPG key: http://radek.karnet.pl/ ]

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to