Please sign in to comment.
Use ASCII-8BIT paths in ActionDispatch::Static
The rack gem returns PATH_INFO as an ASCII-8BIT encoded string but it was being converted to US-ASCII by the match? method because it was calling Rack::Utils.escape_path. To prevent incompatibile encoding warnings use ASCII-8BIT strings for the root path and let Ruby handle any filename encoding conversion. Fixes #32294, Closes #32314.
- Loading branch information...
Showing with 15 additions and 4 deletions.
- +3 −3 actionpack/lib/action_dispatch/middleware/static.rb
- +10 −1 actionpack/test/dispatch/static_test.rb
- +1 −0 actionpack/test/fixtures/public/foo/さようなら.html
- BIN actionpack/test/fixtures/public/foo/さようなら.html.gz
- +1 −0 actionpack/test/fixtures/公共/foo/さようなら.html
- BIN actionpack/test/fixtures/公共/foo/さようなら.html.gz