qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gordon Sim (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Resolved: (QPID-640) The C++ struct encode/decode always includes nested structs even when they're empty, and (I believe) transforms empty strings to null
Date Wed, 07 Nov 2007 14:25:50 GMT

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

Gordon Sim resolved QPID-640.
-----------------------------

    Resolution: Fixed

Fixed in r592753

> The C++ struct encode/decode always includes nested structs even when they're empty,
and (I believe) transforms empty strings to null
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-640
>                 URL: https://issues.apache.org/jira/browse/QPID-640
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>            Reporter: Rafael H. Schloming
>            Assignee: Gordon Sim
>
> The code that detectes whether or not a struct field is present does so by checking the
size or value of the field. This results in some odd behavior. 
>  - nested structs will always be included on the wire even when empty because the size
is computed to always include the packing flags
>  - empy strings can never be encoded onto the wire
>  - zero values will be omitted
> As the specification doesn't state that empty values are equivalent to absent ones, this
behavior is probably unsafe since to clients that treat null separately from empty ("" or
0), the broker would appear to be transforming the specified field value.
> As a general rule I'd suggest that when the client presents us fields encoded in a certain
way we should probably leave the encoding of those fields alone unless we're modifying the
semantic value somehow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message