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
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.