GenieFramework / Genie.jl

🧞The highly productive Julia web framework
https://genieframework.com
MIT License
2.26k stars 190 forks source link

fix space issue in static files #711

Closed hhaensel closed 5 months ago

hhaensel commented 5 months ago

This PR addresses an issue raised in Discord that static files that contain spaces are not correctly served.

It turns out that for checking the existence of a file the uri is currently not unescaped.

The slightly unsatisfying part of this PR is that if the route is not a file, the unescaping is done twice; once for the file check and once in match_routes(). The alternative would be to change the req.target at the first entry point and then remove all unescaping at other places. But that sounds like being an overkill given the short amount of time for unescaping.

essenciary commented 5 months ago

Thank you!