# File lib/smart_proxy_abrt/abrt_lib.rb, line 32
  def self.form_data_file(content, file_content_type)
    # Assemble the request body using the special multipart format
    thepart =  "Content-Disposition: form-data; name=\"file\"; filename=\"*buffer*\"\r\n" +
               "Content-Type: #{ file_content_type }\r\n\r\n#{ content }\r\n"

    boundary = self.suggest_separator
    while thepart.include? boundary
      boundary = self.suggest_separator
    end

    body = "--" + boundary + "\r\n" + thepart + "--" + boundary + "--\r\n"
    headers = {
      "User-Agent"     => "foreman-proxy/#{Proxy::VERSION}",
      "Content-Type"   => "multipart/form-data; boundary=#{ boundary }",
      "Content-Length" => body.length.to_s
    }

    return headers, body
  end