aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-12-21 14:44:13 +0000
committerMatthew Wild <mwild1@gmail.com>2010-12-21 14:44:13 +0000
commitbfc6ce85617ded179bc04ce2337eb583e58b4578 (patch)
treeff59e92124c6b3d935281566e233a124f4a51483 /util
parenta8cf2f50055fa9eada83007780d15589ddcdfe27 (diff)
downloadprosody-bfc6ce85617ded179bc04ce2337eb583e58b4578.tar.gz
prosody-bfc6ce85617ded179bc04ce2337eb583e58b4578.zip
util.xmppstream: Allow stream_ns = "" for parsing streams with no xmlns
Diffstat (limited to 'util')
-rw-r--r--util/xmppstream.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/xmppstream.lua b/util/xmppstream.lua
index 0a1bf7ac..cbdadd9b 100644
--- a/util/xmppstream.lua
+++ b/util/xmppstream.lua
@@ -45,7 +45,10 @@ function new_sax_handlers(session, stream_callbacks)
local cb_handlestanza = stream_callbacks.handlestanza;
local stream_ns = stream_callbacks.stream_ns or xmlns_streams;
- local stream_tag = stream_ns..ns_separator..(stream_callbacks.stream_tag or "stream");
+ local stream_tag = stream_callbacks.stream_tag or "stream";
+ if stream_ns ~= "" then
+ stream_tag = stream_ns..ns_separator..stream_tag;
+ end
local stream_error_tag = stream_ns..ns_separator..(stream_callbacks.error_tag or "error");
local stream_default_ns = stream_callbacks.default_ns;