You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by "Darryl L. Pierce (JIRA)" <ji...@apache.org> on 2015/05/11 15:11:00 UTC

[jira] [Created] (PROTON-883) Return the raw bytes as an array for a message in Ruby

Darryl L. Pierce created PROTON-883:
---------------------------------------

             Summary: Return the raw bytes as an array for a message in Ruby
                 Key: PROTON-883
                 URL: https://issues.apache.org/jira/browse/PROTON-883
             Project: Qpid Proton
          Issue Type: Improvement
          Components: ruby-binding
            Reporter: Darryl L. Pierce
            Assignee: Darryl L. Pierce


When retrieving a message that contains raw bytes rather than strings, the Swig bindings can return a truncated string. This is due to the method SWIG_FromCharPtr stopping at the first 0 byte since it's treating the content as a C string and not as an array of bytes.

The code should, instead, using something like SWIG_FromCharPtrAndSize to return the full content and not guess at the length based on null bytes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)