diff options
Diffstat (limited to 'lib/webrick/httpservlet/filehandler.rb')
-rw-r--r-- | lib/webrick/httpservlet/filehandler.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/webrick/httpservlet/filehandler.rb b/lib/webrick/httpservlet/filehandler.rb index 2044d6eabe..5bd96317e6 100644 --- a/lib/webrick/httpservlet/filehandler.rb +++ b/lib/webrick/httpservlet/filehandler.rb @@ -36,17 +36,12 @@ module WEBrick def initialize(server, local_path) super(server, local_path) - @local_path = local_path + @local_path = local_path.dup.force_encoding("UTF-8") end # :stopdoc: def do_GET(req, res) - case enc = Encoding.find('filesystem') - when Encoding::US_ASCII, Encoding::ASCII_8BIT - else - @local_path = @local_path.dup.force_encoding(enc) - end st = File::stat(@local_path) mtime = st.mtime res['etag'] = sprintf("%x-%x-%x", st.ino, st.size, st.mtime.to_i) |