diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-18 06:58:55 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-18 06:58:55 +0000 |
commit | 0f52ce451b8c62eaa365093d1aee3ccd61e034eb (patch) | |
tree | 0822df935f3a77eda56d94dd7f21c15feda69799 /lib | |
parent | d3d7f940367aa5db5527b14794437238f9f1e989 (diff) | |
download | ruby-0f52ce451b8c62eaa365093d1aee3ccd61e034eb.tar.gz ruby-0f52ce451b8c62eaa365093d1aee3ccd61e034eb.tar.xz ruby-0f52ce451b8c62eaa365093d1aee3ccd61e034eb.zip |
* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#read_request_line):
use possessive match for path retrieval to avoid huge recursion
for insanely long path.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/webrick/httprequest.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/webrick/httprequest.rb b/lib/webrick/httprequest.rb index 889a83abe..3a8d74401 100644 --- a/lib/webrick/httprequest.rb +++ b/lib/webrick/httprequest.rb @@ -249,7 +249,7 @@ module WEBrick end @request_time = Time.now raise HTTPStatus::EOFError unless @request_line - if /^(\S+)\s+(\S+)(?:\s+HTTP\/(\d+\.\d+))?\r?\n/mo =~ @request_line + if /^(\S+)\s+(\S++)(?:\s+HTTP\/(\d+\.\d+))?\r?\n/mo =~ @request_line @request_method = $1 @unparsed_uri = $2 @http_version = HTTPVersion.new($3 ? $3 : "0.9") |