{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka/issues/17973","labels_url":"https://api.github.com/repos/akka/akka/issues/17973/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka/issues/17973/comments","events_url":"https://api.github.com/repos/akka/akka/issues/17973/events","html_url":"https://github.com/akka/akka/issues/17973","id":94598363,"number":17973,"title":"http: Multipart parser fails on files with non-ASCII names","user":{"login":"stanch","id":2670454,"avatar_url":"https://avatars.githubusercontent.com/u/2670454?v=3","gravatar_id":"","url":"https://api.github.com/users/stanch","html_url":"https://github.com/stanch","followers_url":"https://api.github.com/users/stanch/followers","following_url":"https://api.github.com/users/stanch/following{/other_user}","gists_url":"https://api.github.com/users/stanch/gists{/gist_id}","starred_url":"https://api.github.com/users/stanch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanch/subscriptions","organizations_url":"https://api.github.com/users/stanch/orgs","repos_url":"https://api.github.com/users/stanch/repos","events_url":"https://api.github.com/users/stanch/events{/privacy}","received_events_url":"https://api.github.com/users/stanch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/akka/akka/labels/t:http","name":"t:http","color":"ededed"},{"url":"https://api.github.com/repos/akka/akka/labels/t:http:core","name":"t:http:core","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-12T20:50:43Z","updated_at":"2015-07-13T08:46:36Z","closed_at":"2015-07-13T08:44:36Z","body":"Non-ASCII strikes back! Here’s the entity I’m getting when uploading a file with a Cyrillic name through a form (I decoded it with `ctx.request.entity.dataBytes.runFold(\"\")(_ + _.decodeString(\"UTF-8\")).foreach(println)`):\r\n\r\n```\r\n------WebKitFormBoundaryQ4eUWGu4eNQx0Riq\r\nContent-Disposition: form-data; name=\"file-field\"; filename=\"тест.txt\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n------WebKitFormBoundaryQ4eUWGu4eNQx0Riq\r\nContent-Disposition: form-data; name=\"other-field\"\r\n\r\n\r\n------WebKitFormBoundaryQ4eUWGu4eNQx0Riq--\r\n```\r\n\r\nAnd here is the server response when I try to parse `entity(as[FormData])`:\r\n\r\n```\r\nThe request content was malformed:\r\nmultipart/form-data part must contain `Content-Disposition` header with `name` parameter\r\n```\r\n\r\nGiven that the filename decodes correctly in UTF-8, the browser (Chrome) does not seem to follow [RFC 2231](http://tools.ietf.org/html/rfc2231), right? It should either send ASCII or encode it as `filename*=utf8''...`.\r\n\r\nSo assuming I’m understanding the issue correctly, the questions are:\r\n1) Does akka-http support RFC 2231? If not, should it?\r\n2) If the browser chooses to ignore it, can akka-http be less pessimistic and try to decode in UTF-8?"},"comment":{"url":"https://api.github.com/repos/akka/akka/issues/comments/120852669","html_url":"https://github.com/akka/akka/issues/17973#issuecomment-120852669","issue_url":"https://api.github.com/repos/akka/akka/issues/17973","id":120852669,"user":{"login":"jrudolph","id":9868,"avatar_url":"https://avatars.githubusercontent.com/u/9868?v=3","gravatar_id":"","url":"https://api.github.com/users/jrudolph","html_url":"https://github.com/jrudolph","followers_url":"https://api.github.com/users/jrudolph/followers","following_url":"https://api.github.com/users/jrudolph/following{/other_user}","gists_url":"https://api.github.com/users/jrudolph/gists{/gist_id}","starred_url":"https://api.github.com/users/jrudolph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrudolph/subscriptions","organizations_url":"https://api.github.com/users/jrudolph/orgs","repos_url":"https://api.github.com/users/jrudolph/repos","events_url":"https://api.github.com/users/jrudolph/events{/privacy}","received_events_url":"https://api.github.com/users/jrudolph/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T08:46:36Z","updated_at":"2015-07-13T08:46:36Z","body":"@stanch in any case thanks for the additional links. Very helpful."}}