summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-22 07:22:01 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-22 07:22:01 +0000
commita4cd67740a0ad8b1db4ade0792d0ba34b607dc79 (patch)
tree51f3c4b1d405f81aec17311967d943ca15aba464 /lib
parentfb5c60ddbe7693146ea893afa5b2b62de3aa02c3 (diff)
Tue, 10 Aug 2010 08:36:00 +0000 naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
merge revision(s) 28949: merge revision(s) 28945: * lib/webrick/httprequest.rb (WEBrick::HTTPRequest::parse_uri): rollup leading slashes. [ruby-core:31657] patched by Jamison Wilde NOTE: //authority/path is valid relative URI both RFC2396 and RFC3986. So when give a relative URI-like string to URI lib, users must care leading slashes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@28949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@29860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/webrick/httprequest.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/webrick/httprequest.rb b/lib/webrick/httprequest.rb
index 5bb470285f..4a5d6b9d01 100644
--- a/lib/webrick/httprequest.rb
+++ b/lib/webrick/httprequest.rb
@@ -249,6 +249,7 @@ module WEBrick
if @config[:Escape8bitURI]
str = HTTPUtils::escape8bit(str)
end
+ str.sub!(%r{\A/+}o, '/')
uri = URI::parse(str)
return uri if uri.absolute?
if self["host"]