diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2015-03-27 03:46:19 +0900 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-04-09 19:25:12 -0300 |
commit | 7e504927090362d132d4e315c6f22915050fe5ba (patch) | |
tree | 394f263d73beba45d474ce02e643e1fe227a0162 /actionpack/lib/action_dispatch | |
parent | 2a73b5999e27e4c6dd052013bf814c6be965f56a (diff) | |
download | rails-7e504927090362d132d4e315c6f22915050fe5ba.tar.gz rails-7e504927090362d132d4e315c6f22915050fe5ba.tar.bz2 rails-7e504927090362d132d4e315c6f22915050fe5ba.zip |
[Rails4 regression] prevent thin and puma cause error in Non ASCII URL on Windows
* https://github.com/rails/rails/issues/19187
* https://github.com/rails/rails/pull/19533
* https://github.com/macournoyer/thin/issues/268
These are serious Rails 4 regression for Redmine Bitnami Windows users.
https://community.bitnami.com/t/problems-with-3-0-1-installation-see-report-inside/30195/
It is not caused on webrick users.
Related:
* https://github.com/rack/rack/issues/732#issuecomment-67677272
* https://github.com/phusion/passenger/issues/1328
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/static.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/static.rb b/actionpack/lib/action_dispatch/middleware/static.rb index fdd1bc4e69..9a92b690c7 100644 --- a/actionpack/lib/action_dispatch/middleware/static.rb +++ b/actionpack/lib/action_dispatch/middleware/static.rb @@ -28,7 +28,7 @@ module ActionDispatch paths = [path, "#{path}#{ext}", "#{path}/index#{ext}"] if match = paths.detect { |p| - path = File.join(@root, p) + path = File.join(@root, p.force_encoding('UTF-8')) begin File.file?(path) && File.readable?(path) rescue SystemCallError |