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,!"$40U8+$h$m$7$/$*4j$$$7$^$9!#e(B
#!/Users/fujioka/local/bin/ruby19
vim:fileencoding=UTF-8
require ‘cgi’
@cgi=CGI.new(“html3”,“UTF-8”)
@header = { “type” => “text/html”, “charset” => “UTF-8” }
@cgi.out(@header) do
@cgi.html do
@cgi.head{@cgi.title{“e$B$?$$$H$ke(B”}}+
@cgi.body do
“e$B7k2Le(B:#{@cgi[‘title’]}”+
@cgi.form(“action”=>@cgi.script_name) do
@cgi.text_field(“name”=>“title”)+
@cgi.hidden(“name”=>“key”,“value”=>“value”)+
@cgi.submit(“value”=>“OK”)
end
end
end
end
Index: lib/cgi/core.rb
— lib/cgi/core.rb (revision 19280)
+++ lib/cgi/core.rb (working copy)
@@ -600,7 +600,7 @@
stdinput.read(Integer(env_table[‘CONTENT_LENGTH’])) or ‘’
else
read_from_cmdline
@@ -667,7 +667,8 @@
from the command line or (failing that) from standard input.
Otherwise,
cookies and other parameters are parsed automatically from the
standard
CGI locations, which varies according to the REQUEST_METHOD.
- def initialize(type = “query”)
- def initialize(type = “query”,encoding=“ASCII-8BIT”)
- @encoding=encoding
if defined?(MOD_RUBY) && !ENV.key?(“GATEWAY_INTERFACE”)
Apache.request.setup_cgi_env
end