alphagov/router — pull request #45 by dcarley (2013-10-31 10:18:00+00:00)
Title: [Fixes #58795274] Collapse multiple slashes during lookup

Convert multiple adjecent slashes to a single slash for the purposes of
looking up routes. The request URI will be passed to the backend unmodified.

This decreases lookup performance slightly..

Before:
```
BenchmarkLookup 2000000 782 ns/op
BenchmarkLookupBogus 1000000 1213 ns/op
BenchmarkLookupMalicious 100000 19011 ns/op
ok github.com/alphagov/router/triemux 6.057s
```

After:
```
BenchmarkLookup 500000 6484 ns/op
BenchmarkLookupBogus 500000 7786 ns/op
BenchmarkLookupMalicious 50000 36604 ns/op
ok github.com/alphagov/router/triemux 9.919s
```