* 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
@ -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>
|
Tue Nov 18 15:50:11 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* re.c (rb_reg_desc): re might be NULL.
|
* re.c (rb_reg_desc): re might be NULL.
|
||||||
|
@ -249,7 +249,7 @@ module WEBrick
|
|||||||
end
|
end
|
||||||
@request_time = Time.now
|
@request_time = Time.now
|
||||||
raise HTTPStatus::EOFError unless @request_line
|
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
|
@request_method = $1
|
||||||
@unparsed_uri = $2
|
@unparsed_uri = $2
|
||||||
@http_version = HTTPVersion.new($3 ? $3 : "0.9")
|
@http_version = HTTPVersion.new($3 ? $3 : "0.9")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user