starlette
starlette copied to clipboard
Use `raw_path` instead of `path` in the router to be able to differentiate requests which include %2F
I proposed this functionality in #1827 and added a bit of color in there, this was a quick-and-dirty change so I don't really have a good sense for any far-reaching implications of this change. But it was relatively-simple to implement so I thought I'd give it a shot.
Using raw_path instead of the pre-parsed path in the router would enable the it to distinguish between paths which include URL-encoded slashes, e.g. between my%2Froute/example and my/route/example