{"action":"created","issue":{"url":"https://api.github.com/repos/rest-client/rest-client/issues/403","labels_url":"https://api.github.com/repos/rest-client/rest-client/issues/403/labels{/name}","comments_url":"https://api.github.com/repos/rest-client/rest-client/issues/403/comments","events_url":"https://api.github.com/repos/rest-client/rest-client/issues/403/events","html_url":"https://github.com/rest-client/rest-client/pull/403","id":92369063,"number":403,"title":"Filenames in multipart requests should be encoded.","user":{"login":"mikelitvinets","id":9080149,"avatar_url":"https://avatars.githubusercontent.com/u/9080149?v=3","gravatar_id":"","url":"https://api.github.com/users/mikelitvinets","html_url":"https://github.com/mikelitvinets","followers_url":"https://api.github.com/users/mikelitvinets/followers","following_url":"https://api.github.com/users/mikelitvinets/following{/other_user}","gists_url":"https://api.github.com/users/mikelitvinets/gists{/gist_id}","starred_url":"https://api.github.com/users/mikelitvinets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikelitvinets/subscriptions","organizations_url":"https://api.github.com/users/mikelitvinets/orgs","repos_url":"https://api.github.com/users/mikelitvinets/repos","events_url":"https://api.github.com/users/mikelitvinets/events{/privacy}","received_events_url":"https://api.github.com/users/mikelitvinets/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-01T12:25:33Z","updated_at":"2015-07-02T06:53:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rest-client/rest-client/pulls/403","html_url":"https://github.com/rest-client/rest-client/pull/403","diff_url":"https://github.com/rest-client/rest-client/pull/403.diff","patch_url":"https://github.com/rest-client/rest-client/pull/403.patch"},"body":"Since webservers try to decode filename field it should be encoded.\r\nOtherwise, for example for the file called `c++.txt`, pluses will\r\nbe treated as encoded spaces, and the result will be `c  .txt`.\r\n\r\nYou can find how it's done in rack:\r\nhttps://github.com/rack/rack/blob/master/lib/rack/multipart/parser.rb#L152\r\n\r\nThe function `get_filename` extracts file name and [encodes](https://github.com/rack/rack/blob/master/lib/rack/multipart/parser.rb#L167) it using [URI module](https://github.com/rack/rack/blob/master/lib/rack/utils.rb#L31).\r\n\r\nIn case of `c++.txt`, pluses will be replaced with spaces because of [this](https://github.com/ruby/ruby/blob/trunk/lib/uri/common.rb#L346)."},"comment":{"url":"https://api.github.com/repos/rest-client/rest-client/issues/comments/117935056","html_url":"https://github.com/rest-client/rest-client/pull/403#issuecomment-117935056","issue_url":"https://api.github.com/repos/rest-client/rest-client/issues/403","id":117935056,"user":{"login":"mikelitvinets","id":9080149,"avatar_url":"https://avatars.githubusercontent.com/u/9080149?v=3","gravatar_id":"","url":"https://api.github.com/users/mikelitvinets","html_url":"https://github.com/mikelitvinets","followers_url":"https://api.github.com/users/mikelitvinets/followers","following_url":"https://api.github.com/users/mikelitvinets/following{/other_user}","gists_url":"https://api.github.com/users/mikelitvinets/gists{/gist_id}","starred_url":"https://api.github.com/users/mikelitvinets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikelitvinets/subscriptions","organizations_url":"https://api.github.com/users/mikelitvinets/orgs","repos_url":"https://api.github.com/users/mikelitvinets/repos","events_url":"https://api.github.com/users/mikelitvinets/events{/privacy}","received_events_url":"https://api.github.com/users/mikelitvinets/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T06:53:41Z","updated_at":"2015-07-02T06:53:41Z","body":"Travis shows that build 453.6 (jruby) has failed, while the others are ok. It was an error during `bundle install`, but I don't think it has something to do with my patch. Should I investigate it?"}}