rejectedsoftware/vibe.d — pull request #737 by sobels (2014-07-22 05:35:56+00:00)
Title: Support path normalization before matching routes

Adds support for path normalization (fixes #667) by adding a new class, `NormalizedURLRouter`. Rationale for using a new class:
* Using a new class allows `URLRouter` to encapsulate only the logic for matching routes, and lets another class deal with what paths are considered canonical.
* It seems to be more convenient than adding an intermediate request handler: it is more brief, and the odds are probably pretty low that someone would only want to normalize paths for some subset of routes.

Several sites claim that redirects are better for SEO, but [several](https://support.google.com/webmasters/answer/139066?rd=1) [documents](http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html) show that there are multiple solutions to this (e.g. `rel="canonical"` links, sitemaps). Perhaps redirects should be an optional mode for `NormalizedURLRouter`, but for now I think a simpler and slightly faster default would be to avoid the redirect.

For now, the only normalization performed is to resolve `..`, `.`, and `/`.