Project

General

Profile

Bug #17201 » ruby_2_6_webrick_1_4_4.patch

hsbt (Hiroshi SHIBATA), 09/29/2020 09:07 AM

View differences:

lib/webrick/httprequest.rb
raise HTTPStatus::BadRequest, "bad URI `#{@unparsed_uri}'."
end
if /close/io =~ self["connection"]
if /\Aclose\z/io =~ self["connection"]
@keep_alive = false
elsif /keep-alive/io =~ self["connection"]
elsif /\Akeep-alive\z/io =~ self["connection"]
@keep_alive = true
elsif @http_version < "1.1"
@keep_alive = false
......
return unless socket
if tc = self['transfer-encoding']
case tc
when /chunked/io then read_chunked(socket, block)
when /\Achunked\z/io then read_chunked(socket, block)
else raise HTTPStatus::NotImplemented, "Transfer-Encoding: #{tc}."
end
elsif self['content-length'] || @remaining_size
lib/webrick/version.rb
##
# The WEBrick version
VERSION = "1.4.2"
VERSION = "1.4.4"
end
test/webrick/test_httpproxy.rb
end
end
end
end
end if RUBY_VERSION >= '2.5'
def make_certificate(key, cn)
subject = OpenSSL::X509::Name.parse("/DC=org/DC=ruby-lang/CN=#{cn}")
test/webrick/test_httpserver.rb
server.virtual_host(WEBrick::HTTPServer.new(vhost_config))
Thread.pass while server.status != :Running
sleep 1 if RubyVM::MJIT.enabled? # server.status behaves unexpectedly with --jit-wait
sleep 1 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # server.status behaves unexpectedly with --jit-wait
assert_equal(1, started, log.call)
assert_equal(0, stopped, log.call)
assert_equal(0, accepted, log.call)
test/webrick/test_server.rb
}
TestWEBrick.start_server(Echo, config){|server, addr, port, log|
true while server.status != :Running
sleep 1 if RubyVM::MJIT.enabled? # server.status behaves unexpectedly with --jit-wait
sleep 1 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # server.status behaves unexpectedly with --jit-wait
assert_equal(1, started, log.call)
assert_equal(0, stopped, log.call)
assert_equal(0, accepted, log.call)
(2-2/3)