diff options
author | Matthew Wild <mwild1@gmail.com> | 2016-03-05 23:37:56 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2016-03-05 23:37:56 +0000 |
commit | f9108d1829d6ceeb4d31530f3ee8a642dd5d468e (patch) | |
tree | 353fea8d1eaa124da0412f741f5728dce91325d3 /util/xmppstream.lua | |
parent | 6ce9431a13b57f16f50e65be5e21bda59e57d82b (diff) | |
download | prosody-f9108d1829d6ceeb4d31530f3ee8a642dd5d468e.tar.gz prosody-f9108d1829d6ceeb4d31530f3ee8a642dd5d468e.zip |
util.xmppstream: Remove namespace tracking, it's broken as implemented
The code fails to handle namespaces on the initial opening tag (when 'stanza' is nil). Fixing this
seems not worth the effort for a feature that is not being used.
Diffstat (limited to 'util/xmppstream.lua')
-rw-r--r-- | util/xmppstream.lua | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/util/xmppstream.lua b/util/xmppstream.lua index 3d97acef..7be63285 100644 --- a/util/xmppstream.lua +++ b/util/xmppstream.lua @@ -196,29 +196,6 @@ local function new_sax_handlers(session, stream_callbacks, cb_handleprogress) end end - if stream_callbacks.track_namespaces then - local namespaces = {} - function xml_handlers:StartNamespaceDecl(prefix, url) - if prefix ~= nil then - namespaces[prefix] = url - end - end - function xml_handlers:EndNamespaceDecl(prefix) - if prefix ~= nil then - namespaces[prefix] = nil - end - end - local old_startelement = xml_handlers.StartElement - function xml_handlers:StartElement(tagname, attr) - old_startelement(self, tagname, attr) - local n = {} - for prefix, url in pairs(namespaces) do - n[prefix] = url - end - stanza.namespaces = n - end - end - local function restricted_handler(parser) cb_error(session, "parse-error", "restricted-xml", "Restricted XML, see RFC 6120 section 11.1."); if not parser.stop or not parser:stop() then |