178 local features = st.stanza("stream:features"); |
178 local features = st.stanza("stream:features"); |
179 fire_event("stream-features", session, features); |
179 fire_event("stream-features", session, features); |
180 --xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh' |
180 --xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh' |
181 local response = st.stanza("body", { xmlns = xmlns_bosh, |
181 local response = st.stanza("body", { xmlns = xmlns_bosh, |
182 inactivity = tostring(BOSH_DEFAULT_INACTIVITY), polling = tostring(BOSH_DEFAULT_POLLING), requests = tostring(BOSH_DEFAULT_REQUESTS), hold = tostring(session.bosh_hold), maxpause = "120", |
182 inactivity = tostring(BOSH_DEFAULT_INACTIVITY), polling = tostring(BOSH_DEFAULT_POLLING), requests = tostring(BOSH_DEFAULT_REQUESTS), hold = tostring(session.bosh_hold), maxpause = "120", |
183 sid = sid, ver = '1.6', from = session.host, secure = 'true', ["xmpp:version"] = "1.0", |
183 sid = sid, authid = sid, ver = '1.6', from = session.host, secure = 'true', ["xmpp:version"] = "1.0", |
184 ["xmlns:xmpp"] = "urn:xmpp:xbosh", ["xmlns:stream"] = "http://etherx.jabber.org/streams" }):add_child(features); |
184 ["xmlns:xmpp"] = "urn:xmpp:xbosh", ["xmlns:stream"] = "http://etherx.jabber.org/streams" }):add_child(features); |
185 request:send{ headers = default_headers, body = tostring(response) }; |
185 request:send{ headers = default_headers, body = tostring(response) }; |
186 |
186 |
187 request.sid = sid; |
187 request.sid = sid; |
188 return; |
188 return; |