diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb index 623a144350..1f795d7d9d 100644 --- a/lib/net/http/header.rb +++ b/lib/net/http/header.rb @@ -218,7 +218,7 @@ def each_capitalized alias canonical_each each_capitalized def capitalize(name) - name.to_s.split(/-/).map {|s| s.capitalize }.join('-') + name.to_s.split('-').map {|s| s.capitalize }.join('-') end private :capitalize @@ -239,7 +239,7 @@ def range end byte_range_set = $1 - result = byte_range_set.split(/,/).map {|spec| + result = byte_range_set.split(',').map {|spec| m = /(\d+)?\s*-\s*(\d+)?/i.match(spec) or raise Net::HTTPHeaderSyntaxError, "invalid byte-range-spec: '#{spec}'" d1 = m[1].to_i