diff options
Diffstat (limited to 'lib/webrick')
-rw-r--r-- | lib/webrick/httprequest.rb | 2 | ||||
-rw-r--r-- | lib/webrick/httputils.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/webrick/httprequest.rb b/lib/webrick/httprequest.rb index 80188b8cfc..2dca0655d6 100644 --- a/lib/webrick/httprequest.rb +++ b/lib/webrick/httprequest.rb @@ -240,7 +240,7 @@ module WEBrick end end begin - @header = HTTPUtils::parse_header(@raw_header) + @header = HTTPUtils::parse_header(@raw_header.join) rescue => ex raise HTTPStatus::BadRequest, ex.message end diff --git a/lib/webrick/httputils.rb b/lib/webrick/httputils.rb index c93146997f..38a42b98f8 100644 --- a/lib/webrick/httputils.rb +++ b/lib/webrick/httputils.rb @@ -127,7 +127,7 @@ module WEBrick def parse_header(raw) header = Hash.new([].freeze) field = nil - raw.each{|line| + raw.lines.each{|line| case line when /^([A-Za-z0-9!\#$%&'*+\-.^_`|~]+):\s*(.*?)\s*\z/om field, value = $1, $2 |