ruby-changes:8736
From: yugui <ko1@a...>
Date: Wed, 19 Nov 2008 01:48:51 +0900 (JST)
Subject: [ruby-changes:8736] Ruby:r20271 (ruby_1_9_1): merges r20244 from trunk into ruby_1_9_1.
yugui 2008-11-19 01:48:32 +0900 (Wed, 19 Nov 2008) New Revision: 20271 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20271 Log: merges r20244 from trunk into ruby_1_9_1. * lib/webrick/httprequest.rb (WEBrick::HTTPRequest#read_request_line): use possessive match for path retrieval to avoid huge recursion for insanely long path. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/lib/webrick/httprequest.rb Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 20270) +++ ruby_1_9_1/ChangeLog (revision 20271) @@ -1,3 +1,9 @@ +Tue Nov 18 15:56:55 2008 Yukihiro Matsumoto <matz@r...> + + * 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@r...> * re.c (rb_reg_desc): re might be NULL. Index: ruby_1_9_1/lib/webrick/httprequest.rb =================================================================== --- ruby_1_9_1/lib/webrick/httprequest.rb (revision 20270) +++ ruby_1_9_1/lib/webrick/httprequest.rb (revision 20271) @@ -249,7 +249,7 @@ 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") -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/