Ticket #56 (closed defect: fixed)
[PATCH] UriTemplate.Match should normalize uris
| Reported by: | anonymous | Owned by: | serialseb |
|---|---|---|---|
| Priority: | critical | Milestone: | 2.0 Beta 1 |
| Component: | Core - Pipeline | Version: | 2.0 Beta 1 - 2.0.100.195 |
| Keywords: | Cc: | ||
| Time remaining: | 1d | Blocked By: | |
| Time spent: | 1d | Time planned: | 1d |
| Blocking: |
Description
I've moved from WebDev? server to IIS7 & immediately all my resources started to fail with 404 not found because ResourceTypeResolver? couldn't match incoming urls to resources anymore. Digging into the source & debugging revealed that under IIS7 the app base uri is like http://localhost/rastademo, i.e. without trailing slash. So the segments are "/" & "rastademo". When browsing to http://localhost/rastademo/ incoming uri segments are "/" & "rastademo/", so they do not match.
Attached patch normalizes both base & incoming uris by trimming trailing "/" of segment ("/" segments are not trimmed) before matching uris by segments. This solves the issue. All tests pass.

