summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
author(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-12-15 18:54:30 +0000
committer(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-12-15 18:54:30 +0000
commit3f481aa21b7e178b9d0d8dfed0319e81d6bf2131 (patch)
tree7588e94fd99d085bbd448baa4ef59ef7d6dde7a3 /lib
parent74483e11f55124cf9cd679a8964614fe8b354e4f (diff)
This commit was manufactured by cvs2svn to create tag 'v1_8_5_10'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_8_5_10@11397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/cgi.rb7
-rw-r--r--lib/rdoc/ri/ri_options.rb1
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/cgi.rb b/lib/cgi.rb
index 1598df89f2..ac80d91799 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -967,6 +967,7 @@ class CGI
def read_multipart(boundary, content_length)
params = Hash.new([])
boundary = "--" + boundary
+ quoted_boundary = Regexp.quote(boundary, "n")
buf = ""
bufsize = 10 * 1024
boundary_end=""
@@ -998,7 +999,7 @@ class CGI
end
body.binmode if defined? body.binmode
- until head and /#{boundary}(?:#{EOL}|--)/n.match(buf)
+ until head and /#{quoted_boundary}(?:#{EOL}|--)/n.match(buf)
if (not head) and /#{EOL}#{EOL}/n.match(buf)
buf = buf.sub(/\A((?:.|\n)*?#{EOL})#{EOL}/n) do
@@ -1018,14 +1019,14 @@ class CGI
else
stdinput.read(content_length)
end
- if c.nil?
+ if c.nil? || c.empty?
raise EOFError, "bad content body"
end
buf.concat(c)
content_length -= c.size
end
- buf = buf.sub(/\A((?:.|\n)*?)(?:[\r\n]{1,2})?#{boundary}([\r\n]{1,2}|--)/n) do
+ buf = buf.sub(/\A((?:.|\n)*?)(?:[\r\n]{1,2})?#{quoted_boundary}([\r\n]{1,2}|--)/n) do
body.print $1
if "--" == $2
content_length = -1
diff --git a/lib/rdoc/ri/ri_options.rb b/lib/rdoc/ri/ri_options.rb
index 91a28e1ab4..db9f4afecf 100644
--- a/lib/rdoc/ri/ri_options.rb
+++ b/lib/rdoc/ri/ri_options.rb
@@ -3,6 +3,7 @@
module RI
+ require 'rdoc/ri/ri_paths'
require 'rdoc/ri/ri_display'
VERSION_STRING = "ri v1.0.1 - 20041108"