Project

General

Profile

Bug #16753

ruby -run -e httpd . -p 8080 , not support CJK directorys .

Added by sevk (kk kk) 2 months ago. Updated 9 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
[ruby-core:97686]

Description

httpd not support CJK directorys .

#1

Updated by sevk (kk kk) 2 months ago

  • Subject changed from ruby -run -e httpd . -p 8080 to ruby -run -e httpd . -p 8080 , not support CJK directorys .

Updated by sevk (kk kk) about 2 months ago

znz (Kazuhiro NISHIYAMA) wrote in #note-2:

https://github.com/ruby/ruby/pull/2998



--- filehandler.rb.old  2020-04-09 09:49:57.536780938 +0800
+++ filehandler.rb  2020-04-09 09:51:07.854878036 +0800
@@ -520,6 +520,7 @@
           s =  "<TR><TD class=\"name\"><A HREF=\"#{HTTPUtils::escape(name)}#{query if name.end_with?('/')}\">#{HTMLUtils::escape(dname)}</A></TD>"
           s << "<TD class=\"mtime\">" << (time ? time.strftime("%Y/%m/%d %H:%M") : "") << "</TD>"
           s << "<TD class=\"size\">" << (size >= 0 ? size.to_s : "-") << "</TD></TR>\n"
+          s.force_encoding 'ASCII-8BIT'
           res.body << s
         }
         res.body << "</TBODY></TABLE>"



Updated by jeremyevans0 (Jeremy Evans) 9 days ago

  • Status changed from Open to Closed

I merged this patch upstream: https://github.com/ruby/webrick/pull/42

Also available in: Atom PDF