diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-12-21 14:44:13 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-12-21 14:44:13 +0000 |
commit | def542a8fe114a9f09ff54864b7702d9b1eebf1f (patch) | |
tree | cc9609d611a5f8e9dd782870a3dae97de34e1184 /util/xmppstream.lua | |
parent | c0ce2be6632e157cd769186c8bb7255bbd2e64e1 (diff) | |
download | prosody-def542a8fe114a9f09ff54864b7702d9b1eebf1f.tar.gz prosody-def542a8fe114a9f09ff54864b7702d9b1eebf1f.zip |
util.xmppstream: Allow stream_ns = "" for parsing streams with no xmlns
Diffstat (limited to 'util/xmppstream.lua')
-rw-r--r-- | util/xmppstream.lua | 5 |
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; |