summaryrefslogtreecommitdiff
path: root/extlib/Stomp/Message.php
diff options
context:
space:
mode:
Diffstat (limited to 'extlib/Stomp/Message.php')
-rw-r--r--extlib/Stomp/Message.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/extlib/Stomp/Message.php b/extlib/Stomp/Message.php
index 6bcad3efd..055662133 100644
--- a/extlib/Stomp/Message.php
+++ b/extlib/Stomp/Message.php
@@ -29,8 +29,12 @@ require_once 'Stomp/Frame.php';
*/
class Stomp_Message extends Stomp_Frame
{
- public function __construct ($body, $headers = null)
+ public function __construct ($body, $headers = array())
{
+ if(!isset($headers['content-length'])) {
+ // TODO: log this, to see if this is correct
+ $headers['content-length'] = strlen($body);
+ }
$this->_init("SEND", $headers, $body);
}
}