Project

General

Profile

Feature #17111 ยป patch-1.diff

tonytonyjan (Weihang Jian), 08/10/2020 04:04 AM

View differences:

lib/net/http/header.rb
475 475
    @body = nil
476 476
    @body_stream = nil
477 477
    @form_option = formopt
478
    case enctype
479
    when /\Aapplication\/x-www-form-urlencoded\z/i,
480
      /\Amultipart\/form-data\z/i
478
    case enctype.downcase
479
    when 'application/x-www-form-urlencoded', 'multipart/form-data'
481 480
      self.content_type = enctype
482 481
    else
483 482
      raise ArgumentError, "invalid enctype: #{enctype}"