Software /
code /
prosody
Comparison
plugins/mod_bosh.lua @ 1665:2c72b725384e
mod_bosh: Strip BOSH namespace from stanzas to allow for some clients which may send them without the correct xmlns
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 11 Aug 2009 20:38:48 +0100 |
parent | 1664:6587b6c2678e |
child | 1865:388b125b784a |
comparison
equal
deleted
inserted
replaced
1664:6587b6c2678e | 1665:2c72b725384e |
---|---|
19 local fire_event = require "core.eventmanager".fire_event; | 19 local fire_event = require "core.eventmanager".fire_event; |
20 local core_process_stanza = core_process_stanza; | 20 local core_process_stanza = core_process_stanza; |
21 local st = require "util.stanza"; | 21 local st = require "util.stanza"; |
22 local logger = require "util.logger"; | 22 local logger = require "util.logger"; |
23 local log = logger.init("mod_bosh"); | 23 local log = logger.init("mod_bosh"); |
24 local stream_callbacks = { stream_tag = "http://jabber.org/protocol/httpbind|body" }; | 24 |
25 local xmlns_bosh = "http://jabber.org/protocol/httpbind"; -- (hard-coded into a literal in session.send) | 25 local xmlns_bosh = "http://jabber.org/protocol/httpbind"; -- (hard-coded into a literal in session.send) |
26 local stream_callbacks = { stream_tag = "http://jabber.org/protocol/httpbind|body", default_ns = xmlns_bosh }; | |
26 | 27 |
27 local BOSH_DEFAULT_HOLD = tonumber(module:get_option("bosh_default_hold")) or 1; | 28 local BOSH_DEFAULT_HOLD = tonumber(module:get_option("bosh_default_hold")) or 1; |
28 local BOSH_DEFAULT_INACTIVITY = tonumber(module:get_option("bosh_max_inactivity")) or 60; | 29 local BOSH_DEFAULT_INACTIVITY = tonumber(module:get_option("bosh_max_inactivity")) or 60; |
29 local BOSH_DEFAULT_POLLING = tonumber(module:get_option("bosh_max_polling")) or 5; | 30 local BOSH_DEFAULT_POLLING = tonumber(module:get_option("bosh_max_polling")) or 5; |
30 local BOSH_DEFAULT_REQUESTS = tonumber(module:get_option("bosh_max_requests")) or 2; | 31 local BOSH_DEFAULT_REQUESTS = tonumber(module:get_option("bosh_max_requests")) or 2; |