-
Notifications
You must be signed in to change notification settings - Fork 5.4k
* lib/webrick/httpservlet/filehandler.rb: some fix on win platform or not utf-8 platform #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… not utf-8 platform, etc..
@windwiny ping! Could you give some more feedback? |
@zzak hi, did you have a windows system? i am test is in CP936, a directory include filename 桌面 run webrick in console:
and open link in IE:
the IE show:
console log:
|
Use of force_encoding don't seem appropriate. |
chcp can't affect filesystem encoding, which is system-wide. |
* lib/webrick/httpservlet/filehandler.rb (set_dir_list): fix escape methods. query is for links and should be escaped as HTTP, name should be escaped as a path. [rubyGH-314]
* lib/webrick/httpservlet/filehandler.rb (initialize): make encoding customizable. * lib/webrick/httpservlet/filehandler.rb (prevent_directory_traversal): use the given encoding, and encoding of path_info has no sense. * lib/webrick/httpservlet/filehandler.rb (set_dir_list): ditto. Fixes [rubyGH-314]
* lib/webrick/httpservlet/filehandler.rb (set_dir_list): fix escape methods. query is for links and should be escaped as HTTP, name should be escaped as a path. [rubyGH-314]
* lib/webrick/httpservlet/filehandler.rb (initialize): make encoding customizable. * lib/webrick/httpservlet/filehandler.rb (prevent_directory_traversal): use the given encoding, and encoding of path_info has no sense. * lib/webrick/httpservlet/filehandler.rb (set_dir_list): ditto. Fixes [rubyGH-314]
Can you address this patch to https://bugs.ruby-lang.org/projects/ruby-trunk/issues ? Webrick is only handled on our redmine tracker. Thanks. |
* Fix preprocessor define for YJIT_SUPPORTED_P * Fix comment
* Fix preprocessor define for YJIT_SUPPORTED_P * Fix comment
* Fix preprocessor define for YJIT_SUPPORTED_P * Fix comment
/cc @nobu