aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-07-04 19:38:33 +0100
committerMatthew Wild <mwild1@gmail.com>2010-07-04 19:38:33 +0100
commit88a0d25218bc3f3263d3d734c265c32f8a8a6a8b (patch)
tree31ffbf27aacfa4b1b792456fbb224cbe93befe79
parent1e6c27f39824c7dce4f3b1e4cffa46f192ed5474 (diff)
downloadprosody-88a0d25218bc3f3263d3d734c265c32f8a8a6a8b.tar.gz
prosody-88a0d25218bc3f3263d3d734c265c32f8a8a6a8b.zip
mod_bosh: Add jabber:client namespace to stanzas with no namespace
-rw-r--r--plugins/mod_bosh.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index 66a79785..e03b2bbd 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -190,6 +190,11 @@ function stream_callbacks.streamopened(request, attr)
local r, send_buffer = session.requests, session.send_buffer;
local response = { headers = default_headers }
function session.send(s)
+ -- We need to ensure that outgoing stanzas have the jabber:client xmlns
+ if s.attr and not s.attr.xmlns then
+ s = st.clone(s);
+ s.attr.xmlns = "jabber:client";
+ end
--log("debug", "Sending BOSH data: %s", tostring(s));
local oldest_request = r[1];
if oldest_request then