{"action":"created","issue":{"url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/483","labels_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/483/labels{/name}","comments_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/483/comments","events_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/483/events","html_url":"https://github.com/RESTful-Drupal/restful/issues/483","id":69200467,"number":483,"title":"Files uploaded through PUT do not make it into handler intact","user":{"login":"mpetrovic","id":611447,"avatar_url":"https://avatars.githubusercontent.com/u/611447?v=3","gravatar_id":"","url":"https://api.github.com/users/mpetrovic","html_url":"https://github.com/mpetrovic","followers_url":"https://api.github.com/users/mpetrovic/followers","following_url":"https://api.github.com/users/mpetrovic/following{/other_user}","gists_url":"https://api.github.com/users/mpetrovic/gists{/gist_id}","starred_url":"https://api.github.com/users/mpetrovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpetrovic/subscriptions","organizations_url":"https://api.github.com/users/mpetrovic/orgs","repos_url":"https://api.github.com/users/mpetrovic/repos","events_url":"https://api.github.com/users/mpetrovic/events{/privacy}","received_events_url":"https://api.github.com/users/mpetrovic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-17T19:19:59Z","updated_at":"2015-04-20T16:01:11Z","closed_at":null,"body":"I'm trying to replace a file on the server with the file given by the user, and using the PUT method to do so. \r\n\r\nI'm setting the Content-Type header to the mimetype of the file, and the file itself as the data. By the time it gets to my Restful plugin, the data is gone. There's a few bytes of headers in the request array, and then nothing. \r\n\r\nLooking at restful_parse_request, it looks like its treating everything that isn't a GET or POST like it's assuming all content will either be in JSON or query string format. \r\n\r\n**Proposal**\r\nCheck the Content-Type header for the request when the method is not GET or POST. If it's application/x-www-form-urlencoded, then run it through parse_str. If it's application/json, run it through drupal_json_decode. If it's mulltipart/form-data, parse it manually. if it's anything else, pass the request data untouched to the handler for it to handle."},"comment":{"url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/comments/94493487","html_url":"https://github.com/RESTful-Drupal/restful/issues/483#issuecomment-94493487","issue_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/483","id":94493487,"user":{"login":"rbran100","id":651318,"avatar_url":"https://avatars.githubusercontent.com/u/651318?v=3","gravatar_id":"","url":"https://api.github.com/users/rbran100","html_url":"https://github.com/rbran100","followers_url":"https://api.github.com/users/rbran100/followers","following_url":"https://api.github.com/users/rbran100/following{/other_user}","gists_url":"https://api.github.com/users/rbran100/gists{/gist_id}","starred_url":"https://api.github.com/users/rbran100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbran100/subscriptions","organizations_url":"https://api.github.com/users/rbran100/orgs","repos_url":"https://api.github.com/users/rbran100/repos","events_url":"https://api.github.com/users/rbran100/events{/privacy}","received_events_url":"https://api.github.com/users/rbran100/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T16:01:11Z","updated_at":"2015-04-20T16:01:11Z","body":"@mateu-aguilo-bosch does @mpetrovic solution sound good to you?"}}