mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@20244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4ccfa1e9f8
commit
9d2ecf3d90
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
Tue Nov 18 15:56:55 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#read_request_line):
|
||||
use possessive match for path retrieval to avoid huge recursion
|
||||
for insanely long path.
|
||||
|
||||
Tue Nov 18 15:50:11 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* re.c (rb_reg_desc): re might be NULL.
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue