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 non-greedy match for path retrieval to avoid huge recursion for insanely long path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
abe48d7a4a
commit
c49e73e690
2 changed files with 7 additions and 1 deletions
|
@ -3,6 +3,12 @@ Tue Nov 18 16:18:23 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|||
* lib/logger.rb (ProgName): fixed for svn, based on a patch from
|
||||
Nobuhiro IMAI at [ruby-dev:37108].
|
||||
|
||||
Tue Nov 18 15:59:37 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#read_request_line):
|
||||
use non-greedy match for path retrieval to avoid huge recursion
|
||||
for insanely long path.
|
||||
|
||||
Tue Nov 18 09:42:11 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/optparse.rb (OptionParser::make_switch): makes default
|
||||
|
|
|
@ -225,7 +225,7 @@ module WEBrick
|
|||
@request_line = read_line(socket) if socket
|
||||
@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…
Add table
Add a link
Reference in a new issue