Skip to content

Commit

Permalink
Merge pull request ysbaddaden#23 from tijn/escaped-urls
Browse files Browse the repository at this point in the history
unescape the path for public files
  • Loading branch information
ysbaddaden committed Mar 18, 2016
2 parents 2ab67ce + 4096f3a commit bfc9c7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/prax/middlewares/public_file_middleware.cr
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ module Prax
def path(handler)
public_path = handler.app.path.public_path
uri = URI.parse(handler.request.uri)
File.join(public_path, uri.path.to_s)
path = URI.unescape(uri.path.to_s)
File.join(public_path, path)
end

def file?(file_path)
Expand Down

0 comments on commit bfc9c7a

Please sign in to comment.