Project

General

Profile

Actions

Bug #16753

closed

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

Added by sevk (kk kk) over 4 years ago. Updated over 4 years ago.

Status:
Closed
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 .

Actions #1

Updated by sevk (kk kk) over 4 years 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) over 4 years 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) over 4 years ago

  • Status changed from Open to Closed

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0