mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/webrick/test_filehandler.rb: Second try to fix the CI error
93e6fa1d31
failed to fix the issue.
I suspect that the request path must be encoded as filesystem encoding.
This commit is contained in:
parent
957825639c
commit
2d817e0564
1 changed files with 2 additions and 1 deletions
|
@ -294,7 +294,8 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
|
|||
config = { :DocumentRoot => dir }
|
||||
TestWEBrick.start_httpserver(config) do |server, addr, port, log|
|
||||
http = Net::HTTP.new(addr, port)
|
||||
req = Net::HTTP::Get.new("/%E3%81%82.txt")
|
||||
filesystem_path = "\u3042".encode("filesystem").bytes.map {|b| "%%%X" % b }.join
|
||||
req = Net::HTTP::Get.new("/#{ filesystem_path }.txt")
|
||||
http.request(req){|res| assert_equal("200", res.code, log.call + "\nFilesystem encoding is #{Encoding.find('filesystem')}") }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue