Project

General

Profile

Feature #16773 ยป patch2.diff

timcraft (Tim Craft), 04/10/2020 11:35 AM

View differences:

lib/net/http/header.rb
218 218
  alias canonical_each each_capitalized
219 219

  
220 220
  def capitalize(name)
221
    name.to_s.split(/-/).map {|s| s.capitalize }.join('-')
221
    name.to_s.split('-').map {|s| s.capitalize }.join('-')
222 222
  end
223 223
  private :capitalize
224 224

  
......
239 239
    end
240 240

  
241 241
    byte_range_set = $1
242
    result = byte_range_set.split(/,/).map {|spec|
242
    result = byte_range_set.split(',').map {|spec|
243 243
      m = /(\d+)?\s*-\s*(\d+)?/i.match(spec) or
244 244
              raise Net::HTTPHeaderSyntaxError, "invalid byte-range-spec: '#{spec}'"
245 245
      d1 = m[1].to_i