{"action":"created","issue":{"url":"https://api.github.com/repos/lostisland/faraday/issues/436","labels_url":"https://api.github.com/repos/lostisland/faraday/issues/436/labels{/name}","comments_url":"https://api.github.com/repos/lostisland/faraday/issues/436/comments","events_url":"https://api.github.com/repos/lostisland/faraday/issues/436/events","html_url":"https://github.com/lostisland/faraday/issues/436","id":48705157,"number":436,"title":"picky server having problems with multipart form headers","user":{"login":"vikstrous","id":482425,"avatar_url":"https://avatars.githubusercontent.com/u/482425?v=3","gravatar_id":"","url":"https://api.github.com/users/vikstrous","html_url":"https://github.com/vikstrous","followers_url":"https://api.github.com/users/vikstrous/followers","following_url":"https://api.github.com/users/vikstrous/following{/other_user}","gists_url":"https://api.github.com/users/vikstrous/gists{/gist_id}","starred_url":"https://api.github.com/users/vikstrous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikstrous/subscriptions","organizations_url":"https://api.github.com/users/vikstrous/orgs","repos_url":"https://api.github.com/users/vikstrous/repos","events_url":"https://api.github.com/users/vikstrous/events{/privacy}","received_events_url":"https://api.github.com/users/vikstrous/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-11-13T23:03:36Z","updated_at":"2015-01-04T20:48:17Z","closed_at":null,"body":"I'm having problems using Faraday to communicate with a picky server. The server requires a multipart form, but the form must be encoded in a very particular way and Faraday doesn't seem to have any way to let me do this if I don't encode the request myself.\r\n\r\nThe main issue is that I don't seem to have control over the headers sent inside a \"part\". I need these headers and no more:\r\n\r\n```\r\nContent-Disposition: form-data; name=\"fieldname\"; filename=\"filename\"\r\nContent-Type: application/octet-stream\r\n```\r\n\r\nBut by default when I use this:\r\n\r\n```\r\nc = Faraday.new(...) do |conn|\r\n  conn.request :multipart\r\n  conn.request :url_encoded\r\n  conn.adapter :net_http\r\nend\r\npayload = { 'Filedata' => Faraday::UploadIO.new('filename', 'application/octet-stream') }\r\nc.post '/url', payload\r\n```\r\n\r\nI get these headers inside the \"part\":\r\n\r\n```\r\nContent-Disposition: form-data; name=\"fieldname\"; filename=\"filename\"\r\nContent-Length: <length>\r\nContent-Type: application/octet-stream\r\nContent-Transfer-Encoding: binary\r\n```\r\n\r\nIs there any way for me to control what headers Faraday puts in there? If not, that would be a very useful feature. Right now I just have to manually construct the body."},"comment":{"url":"https://api.github.com/repos/lostisland/faraday/issues/comments/68648275","html_url":"https://github.com/lostisland/faraday/issues/436#issuecomment-68648275","issue_url":"https://api.github.com/repos/lostisland/faraday/issues/436","id":68648275,"user":{"login":"vikstrous","id":482425,"avatar_url":"https://avatars.githubusercontent.com/u/482425?v=3","gravatar_id":"","url":"https://api.github.com/users/vikstrous","html_url":"https://github.com/vikstrous","followers_url":"https://api.github.com/users/vikstrous/followers","following_url":"https://api.github.com/users/vikstrous/following{/other_user}","gists_url":"https://api.github.com/users/vikstrous/gists{/gist_id}","starred_url":"https://api.github.com/users/vikstrous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikstrous/subscriptions","organizations_url":"https://api.github.com/users/vikstrous/orgs","repos_url":"https://api.github.com/users/vikstrous/repos","events_url":"https://api.github.com/users/vikstrous/events{/privacy}","received_events_url":"https://api.github.com/users/vikstrous/received_events","type":"User","site_admin":false},"created_at":"2015-01-04T20:48:17Z","updated_at":"2015-01-04T20:48:17Z","body":"I'm not working on that project any more, so I'm not interested in investigating this further. I worked around the problem by packing the multipart form myself, so it's not an issue for me any more. If you want to investigate this, the picky server is Nessus 5 (and maybe 6); more specifically, the upload API."}}