summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cgi-lib.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/cgi-lib.rb b/lib/cgi-lib.rb
index c6c1caa98b..7033f0f8c1 100644
--- a/lib/cgi-lib.rb
+++ b/lib/cgi-lib.rb
@@ -53,18 +53,16 @@ class CGI < SimpleDelegator
when "GET"
# exception messages should be printed to stdout.
STDERR.reopen(STDOUT)
-
ENV['QUERY_STRING'] or ""
when "POST"
# exception messages should be printed to stdout.
STDERR.reopen(STDOUT)
-
- input.read ENV['CONTENT_LENGTH'].to_i
+ input.read Integer(ENV['CONTENT_LENGTH'])
else
read_from_cmdline
end.split(/&/).each do |x|
key, val = x.split(/=/,2).collect{|x|unescape(x)}
- if @inputs.include?('key')
+ if @inputs.include?(key)
@inputs[key] += "\0" + (val or "")
else
@inputs[key] = (val or "")