You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Benjamin Mahler (JIRA)" <ji...@apache.org> on 2012/09/11 01:50:07 UTC

[jira] [Created] (MESOS-274) Binary files over http endpoints.

Benjamin Mahler created MESOS-274:
-------------------------------------

             Summary: 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


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

[jira] [Commented] (MESOS-274) Unicode / Binary files over http endpoints.

Posted by "Benjamin Mahler (JIRA)" <ji...@apache.org>.
    [ 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

[jira] [Updated] (MESOS-274) Unicode / Binary files over http endpoints.

Posted by "Benjamin Mahler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MESOS-274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Mahler updated MESOS-274:
----------------------------------

    Summary: Unicode / Binary files over http endpoints.  (was: Binary files over http endpoints.)
    
> 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

[jira] [Updated] (MESOS-274) Unicode / Binary files over http endpoints.

Posted by "Benjamin Mahler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MESOS-274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Mahler updated MESOS-274:
----------------------------------

    Priority: Minor  (was: Major)
    
> 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
>            Priority: Minor
>
> 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

[jira] [Assigned] (MESOS-274) Binary files over http endpoints.

Posted by "Benjamin Mahler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MESOS-274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Mahler reassigned MESOS-274:
-------------------------------------

    Assignee: Benjamin Mahler
    
> 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

[jira] [Commented] (MESOS-274) Binary files over http endpoints.

Posted by "Benjamin Mahler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MESOS-274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454435#comment-13454435 ] 

Benjamin Mahler commented on MESOS-274:
---------------------------------------

looking at the JSON RFC.. will probably just extend our current escaping rather than base64 encode
http://www.ietf.org/rfc/rfc4627.txt
                
> 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