mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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/trunk@28945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
073ac4ff5a
commit
6434e1e690
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
Tue Aug 10 14:09:31 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
Tue Aug 10 11:26:33 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
Tue Aug 10 11:26:33 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* lib/un.rb (httpd): SIGQUIT and SIGHUP are not guaranteed to exist.
|
* lib/un.rb (httpd): SIGQUIT and SIGHUP are not guaranteed to exist.
|
||||||
|
|
|
@ -273,6 +273,7 @@ module WEBrick
|
||||||
if @config[:Escape8bitURI]
|
if @config[:Escape8bitURI]
|
||||||
str = HTTPUtils::escape8bit(str)
|
str = HTTPUtils::escape8bit(str)
|
||||||
end
|
end
|
||||||
|
str.sub!(%r{\A/+}o, '/')
|
||||||
uri = URI::parse(str)
|
uri = URI::parse(str)
|
||||||
return uri if uri.absolute?
|
return uri if uri.absolute?
|
||||||
if @forwarded_host
|
if @forwarded_host
|
||||||
|
|
Loading…
Reference in a new issue