Comparison

plugins/mod_bosh.lua @ 5634:7298c9bbb30f

mod_bosh: Some very minor whitespace/layout fixes
author Matthew Wild <mwild1@gmail.com>
date Fri, 24 May 2013 18:37:07 +0100
parent 5188:6689605f8591
child 5635:84d3d7b69f9a
comparison
equal deleted inserted replaced
5633:d999027577ed 5634:7298c9bbb30f
1 -- Prosody IM 1 -- Prosody IM
2 -- Copyright (C) 2008-2010 Matthew Wild 2 -- Copyright (C) 2008-2010 Matthew Wild
3 -- Copyright (C) 2008-2010 Waqas Hussain 3 -- Copyright (C) 2008-2010 Waqas Hussain
4 -- 4 --
5 -- This project is MIT/X11 licensed. Please see the 5 -- This project is MIT/X11 licensed. Please see the
6 -- COPYING file in the source package for more information. 6 -- COPYING file in the source package for more information.
7 -- 7 --
8 8
9 module:set_global(); -- Global module 9 module:set_global(); -- Global module
216 local response_body = tostring(close_reply); 216 local response_body = tostring(close_reply);
217 for _, held_request in ipairs(session.requests) do 217 for _, held_request in ipairs(session.requests) do
218 held_request.headers = default_headers; 218 held_request.headers = default_headers;
219 held_request:send(response_body); 219 held_request:send(response_body);
220 end 220 end
221 sessions[session.sid] = nil; 221 sessions[session.sid] = nil;
222 inactive_sessions[session] = nil; 222 inactive_sessions[session] = nil;
223 sm_destroy_session(session); 223 sm_destroy_session(session);
224 end 224 end
225 225
226 -- Handle the <body> tag in the request payload. 226 -- Handle the <body> tag in the request payload.
289 body_attr.requests = tostring(BOSH_DEFAULT_REQUESTS); 289 body_attr.requests = tostring(BOSH_DEFAULT_REQUESTS);
290 body_attr.wait = tostring(session.bosh_wait); 290 body_attr.wait = tostring(session.bosh_wait);
291 body_attr.hold = tostring(session.bosh_hold); 291 body_attr.hold = tostring(session.bosh_hold);
292 body_attr.authid = sid; 292 body_attr.authid = sid;
293 body_attr.secure = "true"; 293 body_attr.secure = "true";
294 body_attr.ver = '1.6'; from = session.host; 294 body_attr.ver = '1.6';
295 body_attr.from = session.host;
295 body_attr["xmlns:xmpp"] = "urn:xmpp:xbosh"; 296 body_attr["xmlns:xmpp"] = "urn:xmpp:xbosh";
296 body_attr["xmpp:version"] = "1.0"; 297 body_attr["xmpp:version"] = "1.0";
297 end 298 end
298 oldest_request:send(st.stanza("body", body_attr):top_tag()..t_concat(session.send_buffer).."</body>"); 299 oldest_request:send(st.stanza("body", body_attr):top_tag()..t_concat(session.send_buffer).."</body>");
299 session.send_buffer = {}; 300 session.send_buffer = {};