[
https://issues.apache.org/jira/browse/PROTON-2913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Stitcher resolved PROTON-2913.
-------------------------------------
Fix Version/s: proton-c-0.41.0
Resolution: Fixed
> pn_message_encode will create an illegal AMQP message if there is no message
> body
> ---------------------------------------------------------------------------------
>
> Key: PROTON-2913
> URL: https://issues.apache.org/jira/browse/PROTON-2913
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-c
> Affects Versions: proton-c-0.40.0
> Reporter: Andrew Stitcher
> Assignee: Andrew Stitcher
> Priority: Major
> Fix For: proton-c-0.41.0
>
>
> If {{pn_message_encode()}} is called but no body has been set it will encode
> a message with no section for the body. This is not a legal AMQP message as
> they must contain one (or potentially more) of the valid message body types.
> There are 2 potential directions for fixes: either make this an error and
> return an error code and do nothing, or encode a valid body.
> Since this bug has been around since the beginning of proton, it is possible
> that there is code out there that will not take well to receiving an error
> code in this circumstance even if it is bad code generating and illegal AMQP
> frame!
> So I think it's best to generate an AMQP null value as the body in this case.
> This is a valid AMQP message and will be treated as None or null by the
> various language decoders out there.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]