Given the following cgi application:
#!/usr/bin/env ruby
require "cgi"
cgi = CGI.new
cgi.out("nph" => true, "type" => "text/plain", "status" => "OK") do
ENV["INPUT"]
end
and following test raises NullPointerException instead of printing Hello World!:
env = {
"REQUEST_METHOD" => "GET",
"CONTENT_LENGTH" => "0",
"INPUT" => "Hello, World!",
"ANYTHING_NIL" => nil
}
IO.popen([env, "./cgi.rb"], "r") do |cgi|
puts cgi.read
end
The exception is raised on line 242 of ShellLauncher.java, presumably on e.getValue().toString().
MRI and Rubinius do not crash on this test.
Given the following cgi application:
and following test raises NullPointerException instead of printing
Hello World!:The exception is raised on line 242 of ShellLauncher.java, presumably on e.getValue().toString().
MRI and Rubinius do not crash on this test.