You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/05/19 14:08:00 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=14550330#comment-14550330 ]
ASF subversion and git services commented on PROTON-883:
--------------------------------------------------------
Commit 585b306bd22f500cdfc268c759ed2b9c7738940e in qpid-proton's branch refs/heads/master from [~mcpierce]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=585b306 ]
PROTON-883: Wrap pn_transport_peek for Ruby.
Returns an array consisting of the number of bytes returned an a String
packed with the bytes in the buffer.
> 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)