[dancer-users] Should get '/projects/' => also handle /projects redirecting to /projects/

Warren Young wyml at etr-usa.com
Wed Feb 4 01:27:30 GMT 2015


> On Feb 3, 2015, at 5:09 PM, Yitzchak Scott-Thoennes <sthoenna at gmail.com> wrote:
> 
> On Tue, Feb 3, 2015 at 2:50 PM, Warren Young <wyml at etr-usa.com> wrote:
>> This is broken, IMHO, as it violates the expectations of anyone coming from a world where URL components are matched the same way as static files.  That is to say:
>> 
>>    http://example.com/foo
>> 
>> and
>> 
>>    http://example.com/foo/
>> 
>> will both serve $DocumentRoot/foo/index.{html,php,asp,whatever}.
> 
> No, typically the former will just redirect to the latter.

Yes, I realize that.

My point is that most dynamic web generation systems (ASP, PHP, JSP…) don’t let you serve different content from these two URLs.  One is quietly mapped to the other, so that you can enter either into your browser and get the same effect.

By not doing this silent automatic transform, Dancer is at least violating the Principle of Least Surprise, if not actual standards.


More information about the dancer-users mailing list