i got the following form on an external service (someurl.com/xmlimport.html) which is protected by basic auth.\[code\]<html><head><title>Upload</title></head><body><h1>Upload</h1><h2>XML Upload</h2><!--<form action="/cgi-bin/xmlimport.pl" method="post" accept-charset="UTF-8" enctype="multipart/form-data">--><form action="/cgi-bin/xmlimport.pl" method="post" enctype="multipart/form-data">Datei: <input name="dateiname" type="file" size="100" accept="text/*"><input type="submit" value="http://stackoverflow.com/questions/12598983/Absenden"/></form></body></html> \[/code\]I want to post xml files via ruby. This is what i got so far:\[code\]require "net/http"require "uri"uri = URI.parse('http://someurl.com/xmlimport.html')file = "upload.xml"post_body = []post_body << "Content-Disposition: form-data; name='datafile'; filename='#{File.basename(file)}'rn"post_body << "Content-Type: text/plainrn"post_body << "rn"post_body << File.read(file)puts post_bodyhttp = Net::HTTP.new(uri.host, uri.port)request = Net::HTTP:ost.new(uri.request_uri)request.basic_auth "user", "pass"request.body = post_body.joinrequest["Content-Type"] = "multipart/form-data"resp = http.request(request)puts resp.body\[/code\]The response is the content of my xml file and the form. But nothing is processed. What am I doing wrong?Thanks in advance.