starlette icon indicating copy to clipboard operation
starlette copied to clipboard

Use `raw_path` instead of `path` in the router to be able to differentiate requests which include %2F

Open ChiliJohnson opened this issue 3 years ago • 0 comments

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

ChiliJohnson avatar Aug 29 '22 02:08 ChiliJohnson