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/19 14:08:00 UTC

[jira] [Resolved] (PROTON-883) Return the raw bytes from a transport buffer in Ruby.

     [ https://issues.apache.org/jira/browse/PROTON-883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Darryl L. Pierce resolved PROTON-883.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 0.9.1

> Return the raw bytes from a transport buffer 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
>             Fix For: 0.9.1
>
>         Attachments: 0001-PROTON-883-Wrap-pn_transport_peek-for-Ruby.patch
>
>
> 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)