serve_dir() does not automatically decode URL-encoded file paths
I have an app that serves static files that have spaces in their names i.e. the file path would look like this on linux:
/app/static/media/some name with spaces.txt
When my website requests the file from tide, it URL-encodes the path, changing spaces to %20 like so:
http://localhost/static/media/some%20name%20with%20spaces.txt
The server doesn't treat these paths as the same.
I'm currently working around this by renaming files, but I wanted to know if this was expected behavior or not.
I imagine that this would cause filenames with certain symbols to also be unservable in the same way
Thanks for filing this. Seems like a bug to me!
I was looking at this issue but I don't think we url-decode anything in Tide anywhere right now? Not route parameters, not query parameters. Is this something we want to build in?
I see this has been open since 2020. I don't know if anyone will read this comment, but it is still a problem. It means I have to implement serve_dir() myself. Is that the approach that others have taken?