I found if the body of a message to be sent cotains leading space, the message will be rejected by the destination because the content-length is not set correctly. It turns out that a piece of code added in call.cpp which is causing this. I have attached the test script I'm using, two messages logs and a temporary patch to remove the piece of code. This applies to version 3.3 and after.