Only add content-length header for messages containing zero byte
Allows OpenMQ/ActiveMQ to correctly map messages to JMS TextMessages instead of only BytesMessages. Fixes https://bugs.php.net/bug.php?id=70280master
parent
618d2bd4d4
commit
acf43f619f
|
@ -747,6 +747,8 @@ PHP_FUNCTION(stomp_send)
|
||||||
CLEAR_FRAME(frame);
|
CLEAR_FRAME(frame);
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
|
if (frame.body_length > 0 && strnlen(frame.body, frame.body_length) >= frame.body_length)
|
||||||
|
frame.body_length = 0;
|
||||||
|
|
||||||
if (stomp_send(stomp, &frame TSRMLS_CC) > 0) {
|
if (stomp_send(stomp, &frame TSRMLS_CC) > 0) {
|
||||||
success = stomp_valid_receipt(stomp, &frame);
|
success = stomp_valid_receipt(stomp, &frame);
|
||||||
|
|
Loading…
Reference in New Issue