[
https://issues.apache.org/jira/browse/MESOS-274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454519#comment-13454519
]
Benjamin Mahler commented on MESOS-274:
---------------------------------------
ok.. unfortunately JSON must be encoded in UTF-8/16/32 and not ASCII, so we
legitimately need to handle unicode.
so there are a few options here:
1. base64 encode file contents
2. disallow looking at unicode files (seems pretty harsh)
3. pull in a (big) unicode lib (like ICU, and operate on unicode strings)
I think 2 is the most sane, but it means a space (33% larger strings) and a
small processing overhead. It also means implementing the encoding / decoding
(or pulling in a lib).
> Unicode / Binary files over http endpoints.
> -------------------------------------------
>
> Key: MESOS-274
> URL: https://issues.apache.org/jira/browse/MESOS-274
> Project: Mesos
> Issue Type: Task
> Reporter: Benjamin Mahler
> Assignee: Benjamin Mahler
>
> We don't encode the json file data we send over http. This is an issue for
> binary files.
> We need to encode file data in base64, and decode on the receiving end
> (webui, cpp tests). We have to do this because it's tricky to protect against
> reading binary files.
> This would also obviate the need to escape unicode (which was left as a TODO
> in json.hpp)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira