multipart_body (Rack::Test::Utils)

    # File lib/rack/test/utils.rb, line 44
          def multipart_body(params)
            multipart_requestify(params).map do |key, value|
              if value.respond_to?(:original_filename)
                ::File.open(value.path, "rb") do |f|
                  f.set_encoding(Encoding::BINARY) if f.respond_to?(:set_encoding)

                  "--\#{MULTIPART_BOUNDARY}\\r\nContent-Disposition: form-data; name=\"\#{key}\"; filename=\"\#{escape(value.original_filename)}\"\\r\nContent-Type: \#{value.content_type}\\r\nContent-Length: \#{::File.stat(value.path).size}\\r\n\\r\n\#{f.read}\\r\n"
                end
              else
    "--\#{MULTIPART_BOUNDARY}\\r\nContent-Disposition: form-data; name=\"\#{key}\"\\r\n\\r\n\#{value}\\r\n"
              end
            end.join("")+"--#{MULTIPART_BOUNDARY}--\r"
          end